I am trying to write a regex to match full words with or without an apostrophe.
I did this:
\b[a-zA-Z']+\b
However, it is matching the letters in bold Jönas while the desired is to not match the word Jönas at all because of the ö on it.
The right matches should go for anything in a-zA-Z'
Thus following cases should match in full:
Jonas
Don't
hasn'T
But not for:
Jönas
Dön't
Hélló
demo here: https://regex101.com/r/2sVN5S/1/ (where Jönas and Hélton should not be matched at all not even partially)
How to fix the regex, to follow this exact match?