On 2/14/06, Gerald Wheeler <[EMAIL PROTECTED]> wrote:
> I am trying to allow input of a person's first and last name in one form
> field, nothing more, nothing less
>
> There should be only one uppercase A-Z character followed by one or
> more lowercase a-z characters followed by one space followed by one
> uppercase A-Z character followed by one or more lowercase a-z
> characters, nothing more.
>
> have tried this which does not work:  /^[A-Z a-z]\s+[A-Z a-z]{1,15}$/
>
> Thanks.

[A-Z a-z] says "match one or more of the characters A through Z,
space, or a through z."  What you want is [A-Z][a-z]+ which says
"match a character A through Z followed by one or more characters a
through z."

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to