Does [_\s^”] mean underscore and whitespace but not ” (quote) in Reg
I understand that the brackets ([ ]) mean character range and that ^ means but not, but my question is can you say [this^notthat] or do I have to separate them into two sets of brackets?
^is only special at the start of a character class. You can even write,[^^]to say, “not a caret”.There is no reason to match “underscore or whitespace, but not
"” because by matching underscore or whitespace you are already guaranteed not to match". Perhaps you want to say something like, “all uppercase letters except Q”. In this case, the easiest option is to use subranges:[A-PR-Z].