Last post Oct 02, 2017 02:48 AM by Cathy Zou
Sep 29, 2017 09:03 AM|bobh0526|LINK
I have an email textbox on a web form. I check to make sure it's a valid email structure using a regular expression. But the email must contain either "@mybank.com" or "@bank.com". What is the best way to check for these search patterns? I need to check
when a the insert button is clicked or the update button. So it should be method that both can use.
Sep 29, 2017 09:25 AM|PatriceSc|LINK
Most often , my personal preference is to build my own MailAddress.TryParse method based on
Of course if you meant that you want this string to end really with something particular you could use String.EndsWith.
Oct 02, 2017 02:48 AM|Cathy Zou|LINK
Are you want to search a regular expression sting to match your email address?
If that the case, you should have something as below:
You could use regex online tester to test your regular expression:
You also could use c# to check:
Something as below:
Regex regex = new Regex(@"\d+");
Match match = regex.Match("Dot 55 Perls");
For more information, please refer to the following links: