Title |
Test
Find
First and Last Name
|
Expression |
^([A-Z][a-z]+)\s([A-Z][a-zA-Z-]+)$ |
Description |
The pattern matches what would at least appear to be a first and last name, with an optional hyphenated last name. There is an obvious flaw that it can't distinguish between actual names and any two words that start with capital letters as noted in the matching text. Also, two part first names like "Mary Jo" can cause problems. |
Matches |
John Smith | Jane Smith-Doe | John McSmith | Abc Xyz |
Non-Matches |
john smith | J Smith | Mrs. Doe |
Author |
Rating:
Not yet rated.
Michael Fienen
|
Source |
|
Your Rating |
|
Title: Ignoring case
Name: Ian Lotinsky
Date: 9/28/2009 2:23:46 PM
Comment:
^([A-Za-z]+)\s([A-Za-z][A-Za-z-]+)$