I am not good at regular expressions, but try the following
^(\w\[?)([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))(\[?)$
Its the simplest format!
Original reg. expression was
^([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))$
I tried to modify it slightly to match your requirement.
Somebody who is good at reg. exp. can update it to be more accurate :-)
- Rakesh
|