try & instead of &
---------------------------------------- > Date: Wed, 31 Mar 2010 08:41:39 -0700 > From: pankajj.j...@gmail.com > To: user@struts.apache.org > Subject: Regular expressions - Email Validation > > > In struts I have regular expression for validating email like this - > > EMail > > ^([a-zA-Z0-9]([\w\.-]*[a-zA-Z0-9])*[...@[a-za-z0-9]([\w\.-]*[a-zA-Z0-9])*\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z])[\s]*$ > > > Now I want to allow & in the email. I tried like this > > ^([a-zA-Z0-9&]([\w\.-]*[a-zA-Z0-9&])*[...@[a-za-z0-9]([\w\.-]*[a-zA-Z0-9])*\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z])[\s]*$ > > OR > > ^([a-zA-Z0-9]([\w\.-]*[a-zA-Z0-9])*[...@[a-za-z0-9]([\w\.-&]*[a-zA-Z0-9])*\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z])[\s]*$ > > I also tried escaping special char using \&. > > But its not working. gives error at deploy time. > > Please help > > -- > View this message in context: > http://old.nabble.com/Regular-expressions---Email-Validation-tp28097766p28097766.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > _________________________________________________________________ Do you have a story that started on Hotmail? Tell us now http://clk.atdmt.com/UKM/go/195013117/direct/01/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org