+ - * / % < > = ! & ^ | ? :
I've tried:
[+-*/%<>=!&^|?:]
But I think some of them will need to be escaped. How can I tell which ones?
You'll need to escape the -
as otherwise it'd be interpreted as a character range between +
and *
, which isn't valid:
[+\-*/%<>=!&^|?:]
The other metacharacters, as far as I know, are taken literally in a character class.