How do I cover all lowercase non-numeric word characters in a regex?
For example this would cover Müller
for german umlauts
/[A-Z][a-zäöü-]+/g
...but what about french or spanish word characters? Is it possible to get those covered by a range or something like that?
The regex should NOT match a string which has multiple uppercase characters, like DOntGetMe
. But it should match McDonald
.
So I came up at the end with
/([A-Z][a-zäöü'-](?:[\w'-]+)?)/g
But it still don't cover french/spanish characters.
https://regex101.com/r/ofl4tj/2
Match
Smith
Müller
McDonald
O'Riley
Lee
Li
Manco-Johnson
Don't match
MIsspelled
ABC