Re: Struts Form Validation Question

2004-12-22 Thread Eddie Bush
CTED]> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > Sent: Monday, December 20, 2004 12:12 AM > Subject: Re: Struts Form Validation Question > > > ^([a-zA-Z]+['-\s])*$ > > > > That's top of my head ... and my head is tired :-( but

Re: Struts Form Validation Question

2004-12-22 Thread send2rajesh
Thanks for your help Eddie! Regex worked perfect. I had given up hope on getting right regex. Thanks Again! - Original Message - From: "Eddie Bush" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Monday, December 20, 2004 1

Re: Struts Form Validation Question

2004-12-20 Thread Eddie Bush
That doesn't address the issue of having multiple - and ' characters together. Plus, it will only allow two-section names. Regular expressions are fantastic, if you can find one to suit your needs. It can often be difficult to arrive at an apropriate expression though :-( Power brings complexit

RE: Struts Form Validation Question

2004-12-20 Thread Ruben Cepeda
Hey, Why not try this regex: ^[a-zA-Z'-]*\s[a-zA-Z'-]*$ * Ruben Cepeda [EMAIL PROTECTED] * Original Message Follows From: <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: <[EMAIL PROT

Re: Struts Form Validation Question

2004-12-19 Thread Eddie Bush
^([a-zA-Z]+['-\s])*$ That's top of my head ... and my head is tired :-( but maybe it's helpful. You need to separate the repeating things from the non-repeating things, and allow the two of them to be chained multiple times. Having such complete validation of a name seems error-prone at best tho