Regex to match words and those with an apostrophe
- by Beau Martínez
I'm looking for a regex to only match words, possibly including numbers, and possibly with an apostrophe at the beginning, middle, or end; and ignore everything else.
So these would be matched verbatim:
'bout
it's
persons'
But these would be ignored:
'
''
However, for words like 'open', open should be matched.