tags:

views:

70

answers:

1

hi all,

i m looking for checking emailid in content of message body. i do not want to allow any one to send message that contain email address as a part of message.

so how can i achieve this in asp.net c#??

Please help me if any one has an idea about this !!!

+2  A: 
Regex re = new Regex(@"[A-Za-z0-9_\-\.]+@([A-Za-z0-9\-]+\.)+([A-Za-z\-])+");
MatchCollection matches = re.Matches(Text);
foreach (Match s in matches)
{//do whatever with s.Value}
Klerk
thanks klerk,it work for me..
Ramani Sandeep