\p{} in regex not working as I expect it to

Here's how I'm expecting this to work:
\p{L} any letter in any language, including accented letters.
\p{M} any mark, such as an accent, which is a separate character
\p{N} any number
\p{Pd} any hyphen
\p{Pc} any underscore or word connector in another language
\' a single quote

{2,50} any combination of the above with a length of 2-50 characters
/u utf8 encoded text

I can't reproduce the error, this snippet works like it should. So try to debug the problem on your side: make a minimal example with only the necessary code and try different variants like a hard coded string, other letters like umlauts etc.

Ideally, I want to be able to take utf-8 content right out of the database and on to an html page, so I'd imagine I want to keep that tag there. Perhaps I could just take it off for the register page, but I don't think I should need to. Here's what I've done in my testing script, which seems to work with the tag still there: