From: Todd Burch Date: 2007-08-19T11:34:23+09:00 Subject: Re: Is this the perfect regex for validating first & last na Alex LeDonne wrote: > > Most assumptions about names turn out to be wrong. > > http://en.wikipedia.org/wiki/List_of_personal_names_that_contain_numbers > > Note names like Jennifer 8. Lee, Perri 6, Nancy 3. Hoffman. > > Good luck! > > -A HA HA. Seeing as there are so few, I think I'll copy those names into an array and specifically reject them. LOL. I joked around with some buddies back in the mid 80's about prefixing my first kid's name with "DSN@", as the code we were working on at the time contained a lot of modules with this prefix. We got a good laugh out of it. Never did do it though - the wife (http://imdb.com/title/tt0092746/) wouldn't have gone for it. I worked the regex out to my satisfaction. I was taking the wrong approach. I decided to reject invalid characters, or what I consider to be invalid characters for a human name on our planet, instead of only accepting valid characters. Shorter, simpler, and it met my other goal of being one facet of stopping a potential spam injection as well. Todd -- Posted via http://www.ruby-forum.com/.