Your regex doesn't "allow" for quotes: it
requires it.
\w+?[']
Says:
Alphanumeric, one or more repetitions, as few as possible; followed by one character in this class: (quote only)
before continuing.
So it will match
O'
S'
aaaaaa'
But will never match
StJames
because the quote is missing.
In addition, adding '|' in a character class specification doesn't act as an "OR", it add the character '|' to the match list.
I think you are being a little overzealous here: English surnames can contain a wide range of silliness and it's probably better to just go "anything is allowed here" rather than trying to spend too much time rigidly validating it, as you are bound to forget someone. For example, my wife's maiden name was "Henderson-Allen" which wouldn't be allowed by your system, and there are many other oddities you will probably annoy people by rejecting if you aren't very careful.