I'm trying to make a simple validation in JavaScript & PHP (for double checking) by using regex. I just want to check that the names will be allowed if there is at least two of these characters:
letters + accents + spaces + simple quotes + dash
^[aA-zZ\u00C0-\u017F- \']{2,}$

Debuggex Demo
But actually, brackets are allowed in my regex pattern (don't know why), and I'd like them to be excluded, how can I do that ?
I know that \u is not allowed in PCRE-like regular expressions.
Thanks
The square brackets are between A and z I think you meant to have a-zA-Z in your regex.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With