How can I match all the “special” chars (like +_*&^%$#@!~) except the char - in PHP?
+_*&^%$#@!~
-
I know that \\W will match all the “s
\\W
You can try this pattern
([^a-zA-Z-])
This should match all characters that are not a-z and the -
a-z