Search code examples
regexvalidationnspredicate

Regex Full Name Validation


Is there a well-defined and thorough example of a Regex string of which can validate a Full Name?

I expect the string to be able to validate a majority of names such as:

  • Stack Overflow
  • John P. Example
  • Martin Luther King, Jr
  • and a variety of foreign letters (if possible)

Solution

  • This can't be done because there is no way to determine if a string of characters is a word or a name without a data set. The best that you can do is match strings that could be names, then check those positive results against a data set for confirmation.