[Chicago-talk] help with Reg Exp, pls...
walter at torres.ws
Mon Dec 15 12:30:17 CST 2003
> -----Original Message-----
> From: chicago-talk-bounces at mail.pm.org
> [mailto:chicago-talk-bounces at mail.pm.org]On Behalf Of Andy Lester
> Sent: Monday, December 15, 2003 11:44 AM
> To: Chicago.pm chatter
> Subject: Re: [Chicago-talk] help with Reg Exp, pls...
> > I can't get a regExp to valid any of these names.
> > All I want to know is if the string given passes or fails a
> test that can
> > handle the examples below...
> > Dr. Roger O'Malley
> > Mrs. Sara Harris-Henderson
> > Manuel Gonzalez
> > Forsok Bokstaver
> > Contem Espaco-Valido
> What are the rules for the names?
I see the extended characters did not make it through the mail lister. The
last 3 names had these characters in them.
mmm, I really don't know...
- a SPACE is used to delimit first from last name [Walter Torres]
- a HYPHEN is used to separate a dual name (British style) [Conrad-Smyth]
- an APOSTROPHE is used in many Irish and Scotish names [o'Rielly]
- a PERIOD is used in titles, suffixes [Dr. Sr. Jr.]
- a PERIOD is used for Initials [Walter G. Torres]
- allow apostrophes, but only if preceded *and* followed by a Alpha/Extend
- allow hyphen/dash, but only if preceded *and* followed by a Alpha/Extend
- allow PERIOD, but only if preceded by a Alpha/Extend *and* followed by a
SPACE or EOS
- allow SPACE, but only if preceded *and* followed by a Alpha/Extend
I guess seems to cover how names are created.
Does that help?
I guess this is a bit more complicated that I first thought.
More information about the Chicago-talk