This is a regex:
[^0-9!a-zA-z#\$%&'\*\+\-/=\?\^_`\{\|\} ~@ \.]+
Matches at least one, but with any character, except for characters enclosed between square brackets. Square brackets per se are not part of the character set. And most of these backslashes are not needed; none of the inverse characters other than a hyphen are special in the character class.
However, since you have a range of Az that has uppercase A through lowercase z , you not only have lowercase letters there twice, but also have all the characters that are between z and A , namely [ , \ , ] , ^ , _ and ` . So, how brackets fall into a negative character class.
If this is not what you intend, this regular expression may be what you are looking for:
[^0-9!a-zA-Z#$%&'*+=?^_`{|} ~@.- ]+
(Moving a hyphen to the end means that it does not need back support)
source share