Is there any way to subtract from an existing character class code? For example, let's say I want to get [a-zA-Z0-9]
, and the closest is \w
, which expands to [a-zA-Z0-9_]
. Is there a way to do something like:
[\w-_]
Or do we just have to re-write the class, i.e., [a-zA-Z0-9]