Title |
Test
Find
Full Name
|
Expression |
^([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]*)+[ ]([a-zA-Z]+[\'\,\.\-]?[a-zA-Z ]+)+$ |
Description |
Requires a person's name including at least 2 parts. (first and last) Allows optional extra names. It allows plenty of initials as well as symbols in names. Restricts symbol usage quite a bit, but allows even names with 2 symbols. Requires last name to have at least 2 characters and cannot be an initial. Works well for filtering names on validation. |
Matches |
E.J. O'Malley | Jack O'Neil | Mary-Lou Elizabeth Jones |
Non-Matches |
Johnathan Michael S. | Prince | Teddy Has-a..Fake-Name |
Author |
Rating:
Brendan Enrick
|
Source |
|
Your Rating |
|
Title: Doesn't like full-stops at end of name
Name: Dwight Doyley
Date: 9/6/2008 4:49:24 AM
Comment:
Great expression but if there is a full stop at the end of the name the script doesn't allow the name. For mildly complex names, the browser goes into a tail-spin (IE7 never recovers). For example:-
Miss Mary Smith-Jones J.P.
Will cause IE7 to hang completely. Firefox 2.x complains of an unresponsive script and gives you the option to kill it.
Title: Doesn't like full-stops at end of name
Name: Dwight Doyley
Date: 9/6/2008 4:43:33 AM
Comment:
Great expression but if there is a full stop at the end of the name the script doesn't allow the name. For mildly complex names, the browser goes into a tail-spin (IE7 never recovers). For example:-
Miss Mary Smith-Jones J.P.
Will cause IE7 to hang completely. Firefox 2.x complains of an unresponsive script and gives you the option to kill it.
Title: Doesn't like full-stops at end of name
Name: Dwight Doyley
Date: 9/6/2008 4:43:13 AM
Comment:
Great expression but if there is a full stop at the end of the name the script doesn't allow the name. For mildly complex names, the browser goes into a tail-spin (IE7 never recovers). For example:-
Miss Mary Smith-Jones J.P.
Will cause IE7 to hang completely. Firefox 2.x complains of an unresponsive script and gives you the option to kill it.