Below regex is not allowing email id with underscore like [email protected]
@"^([0-9a-zA-Z]([-.w]*[0-9a-zA-Z_])*@([0-9a-zA-Z][-w]*[0-9a-zA-Z].)+[a-zA-Z]{2,9})$"
any idea?
Below regex is not allowing email id with underscore like [email protected]
@"^([0-9a-zA-Z]([-.w]*[0-9a-zA-Z_])*@([0-9a-zA-Z][-w]*[0-9a-zA-Z].)+[a-zA-Z]{2,9})$"
any idea?
There's no underscore anywhere in the regexp, which accounts for it not matching underscores. Try adding an underscore to the list of allowed characters to the left of the @
-sign.