A textbox in a WinForm I have created is for e-mail.
I'm checking the validation of the e-mail format. The string seems to be ignoring the "." condition? According to my test, it runs:
- abcdef - Not valid (Correct)
- abcdef@gmail - valid (Incorrect)
- abcdefgmail.com - Not valid (Correct)
- abcdef@gmail.com - Valid (Correct)
Code Snippet:
Regex RX = new Regex("^[-!#$%&'*+/0-9=?A-Z^_a-z{|}~](\\.?[-!#$%&'*+/0-9=?A-Z^_a-z{|}~])*@[a-zA-Z](-?[a-zA-Z0-9])*(\\.[a-zA-Z](-?[a-zA-Z0-9])*)+$");