Phlip
7/28/2008 2:15:00 PM
Vamsi Krishna wrote:
> ex: user+tag@gmail.com
>
> so in order to validate this where should i put + symbol in regular
> expression so that i send emails to user+tag@gmail.com.
E-mail address validation is a FAQ in the Regular Expression discipline.
You can't do it. No Regexp can successfully distinguish valid from invalid
e-mail addresses, in all their permutations.
If you want to provide a simple defense against typographical errors, such as
omitting the @, you must write a Regexp that is too wide, and will permit some
ill-formed addresses to slip past.
--
Phlip