As a follow up to my original post:
Now, email addresses are a bit more complicated and we still need to know how to apply regex in C#. The code will look something like this:
NOTE: Since my regex looked similar to an email, the filters prevent me from submitting it. As a result, I have put my code at a separate location. I apologize for the inconvenience. Code at:
pastebin /37nKMQRk -- note, this is actually a link to pastebin . sea oh em, slash, 37nKMQRk.
Sorry, still cannot post links -- it's pretty ridiculous. Hope it works for you
Ultimately, the regex you want will follow these rules:
1. An email starts with any number of digits, letters, underscores, or periods, etc.
2. Followed by a .
3. Followed by any number of digits, letters, underscores, or periods, etc.
4. Followed by an at symbol
5. Followed by any number of digits, letters, underscores, or periods, etc.
It depends on the level of accuracy you need. As per the RFC 822 compliant regex spec, there isn't a master formula which will match all emails. There are many exceptions to the above regex, like emals containing +'s in them, etc.
Hope this at least points you in the right direction!