Regex help NOT a-z or 0-9

Viewed 29967

I need a regex to find all chars that are NOT a-z or 0-9

I don't know the syntax for the NOT operator in regex.

I want the regex to be NOT [a-z, A-Z, 0-9].

Thanks in advance!

5 Answers

You can also use \W it's a shorthand for non-word character (equal to [^a-zA-Z0-9_])

Related