List Info

Thread: Regular Expression for Personal Names




Regular Expression for Personal Names
user name
2006-04-24 17:11:31
How would you do this?  Specifically, I'm looking for the
names of
people in the form Lastname, Firstname.  I'm guessing that
only ', -,
letters (with the first and the one following the only comma
being the
only ones capitalized), and of course the one , would do it.
Does that look right to you?  How would you write it?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to
regex-unsubscribegooglegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---

Regular Expression for Personal Names
user name
2006-04-24 18:50:12
[A-Z]['a-z-]+\s*,\s*[A-Z]['a-z-]+

would match on

O'neil-fitzpatrik, Jon-fidelio

which satisfies yr spec: ** I'm guessing that only ', -,
letters (with the first and the one following the only comma
being the
only ones capitalized)**

now u might see how tough is to match even simple names with
regex.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to
regex-unsubscribegooglegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )