[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Is this the perfect regex for validating first & last na

Todd Burch

8/18/2007 4:40:00 PM

Todd Burch wrote:
> Todd Burch wrote:
>> Perhaps a fairly bold statement, coming from a novice regex'er. :)
>>
>
> Well, shucks. I missed the hyphenated last name condition. Hillary
> Rodham-Clinton would get bounced... (but maybe that's ok? LOL)

Revised to allow hyphens:

"^(([a-záàâäãåçéèêëíìîïñóòôöõúùûü�ÿ])+(\-?|( ?)*))+$"
--
Posted via http://www.ruby-....

1 Answer

Todd Burch

8/18/2007 4:52:00 PM

0

Todd Burch wrote:

> Revised to allow hyphens:
>
> "^(([a-záàâäãåçéèêëíìîïñóòôöõúùûü�ÿ])+(\-?|( ?)*))+$"

Well, so much for testing my own code. "zá" fails. All the diacritics
fails.

Back to the drawing board.
--
Posted via http://www.ruby-....