I am trying to allow all possible characters for an email id during email validation and I am writing it this way-
^(\s)*[a-zA-Z_]{1}(a-zA-Z0-9.\-_`~!#$&%^*()+,=:{}[\]|\\\<>/?,.;'")*[@]{1}[a-zA-Z0-9]*[a-zA-Z0-9.\-+_]*[a-zA-Z0-9]{1}(\s)*$
But I'm getting a syntax error that says
and the position it displays is after
;
Am I missing something here?
here is the code that contains the pattern. This is being done during struts validation
<field property="email" depends="required,mask">
<arg0 key="alert.user.email" />
<var>
<var-name>mask</var-name>
<var-value>^(\s)*[a-zA-Z_]{1}(a-zA-Z0-9.\-_`~!#$&%^*()+,=:{}[\]|\\\<>/?,.'";)*[@]{1}[a-zA-Z0-9]*[a-zA-Z0-9.\-+_]*[a-zA-Z0-9]{1}(\s)*$</var-value>
</var>
</field>