[thelist] RegExp for name validation...

jsWalter jsWalter at torres.ws
Mon Dec 15 18:04:48 CST 2003

> -----Original Message-----
> From: Chris Brody [mailto:subscriptions at cbrody.com]
> Sent: Monday, December 15, 2003 5:47 PM
> To: jsWalter at torres.ws; thelist at lists.evolt.org
> Subject: RE: [thelist] RegExp for name validation...
> jsWalter wrote on 15 December 2003 23:01:
> > assuming
> You make many assumptions, most of which are incorrect even if considering
> only British names. A double-barrelled name is often /not/ hyphenated, and
> neither middle initials nor titles take a following full-stop (or
> "period",
> e.g. "Sir Michael P Jagger".) Also, a name may be followed by an
> honorific: "Mr Andreas Whittam Smith, CBE".

Ye, I make many assumptions.

But than again, by stating my assumptions, I'm hoping someone will tell me
how they are wrong, short sighted, misleading, incomplete, incorrect, etc.

And the "honorific" is something I didn't think of, but that would not
really be a problem. But the COMMA is not in my rules. So I will have to add

- allow COMMA, but only if preceded by a Alpha/Extend *and* followed by a

> > Sorry, too many "why do you need this" message today.
> Well, what did you expect?

I expected a few clarifying questions, some stabs at an attempt, some notes
telling me I'm nuts for trying. That's what I expected.

> I don't think you will get much help here either unless you are able to
explain what
> you mean by "validating" a name.

My apologies if my explanation wasn't enough. I thought I gave almost too
much detail.

> > I'm trying to build a RegExp that will see if the string is a proper
> > format or not.
> >
> > Names only have A thru Z, extended characters for other languages
> > <snip rules>

I guess I was wrong.

> Are you referring to pre-existing data, or are you capturing new

Sorry, I really don't see how this is relevant to the task: validate names
against the RegExp.

> You really need at least four separate fields in order to capture all
> variations, and if you want to be able to sort the names correctly:
> Forename(s), Surname(s), Suffix.

Yes, that was my first thought as well. But that is not in my "specs" as an

I have a single Text field to parse.

Again, all I'm looking for is a T or F if the given string passed "muster"
against the RegExp.

This has to handle the extended characters as well, as many of the "users"
will not be English speakers.

Thanks for your comments.

Now I have to add that new rule.


More information about the thelist mailing list