Lots of ready-to-use character classes are available in Perl regular expressions, such as \d
or \S
, or new-fangled Unicode grokkers such as \p{P}
, which matches punctuation characters.
Now let's say I'd like to match all punctuation characters \p{P}
(quite a number of them, and not something you want to type in by hand) - all but one, all but the good old komma (or comma, ,
).
Is there a way to specify this requirement short of expanding the handy character class and taking away the komma by hand?