'^((?![Ww][Ee])[ -~])*$'.)]). What does that expre...
# announcements
s
'^((?![Ww][Ee])[ -~])*$'.)]). What does that expression with tilda sign and - mean in regex?
k
anything enclosed in [] is meant to mean “match one of the things contained inside the braces”
So [ -~] looks for the occurrence of a space, a hyphen, or a tilde
so overall it will match
we-are
we~are
WE are
,
WE~are
, etc.
s
There is a ! So it should error out for we
@kyleg
k
gotcha
r
off-topic: https://regexr.com will definitely help you write and examine any kind of regex 😉