struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seeking_solution <pankajj.j...@gmail.com>
Subject Regular expressions - Email Validation
Date Wed, 31 Mar 2010 09:42:20 GMT

In struts I have regular expression for validating email like this - 
<constant>
	  <constant-name>EMail</constant-name>
       
<constant-value>^([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]*$</constant-value>
</constant>	

Now I want to allow & in the email. I tried like this 

<constant-value>^([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]*$</constant-value>

But its not working. gives error at deploy time.

Please help
-- 
View this message in context: http://old.nabble.com/Regular-expressions---Email-Validation-tp28093593p28093593.html
Sent from the Struts - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message