I’m trying to match punctuations using regular expressions.
Do I have to specify every punctuation character I am searching for or is there is an escape sequence I can use?
I’m sitting here smiling to myself that the answers I might get will just be “Yes” or “No”, please elaborate…. (that sentence should match the regular expression twice)
That would be a character class, not an escape sequence. You can use a character class defined by a Unicode category :
This expression matches characters in the category “All Punctuation”. You can find a list of supported categories in the
UnicodeCategoryenumeration