Regex for names

This regex is perfect for me.

^([ \u00c0-\u01ffa-zA-Z'\-])+$

It works fine in php environments using preg_match(), but doesn’t work everywhere.

It matches Jérémie O'Co-nor so I think it matches all UTF-8 names.

Leave a Comment