Added support for hyphen(-) under email regex#543
Conversation
|
thx for ur contribution! besides, i got a good tool for testing regular expressions because of ur mention above~ |
|
btw, after i typed in the left input area, it shows that the 2 lines don't match the regular expression above. then i modified the lines to: it shows they matched. is there anything wrong? |
|
email ending with ".com" is handled separately in code. |
|
yeah, that's a problem of the legacy code, and i think we can remove the if clause here: plus, what do u think? |
|
Absolutely, plus we can completely change the email regex to validate ".com" part within regex itself. Happy to do it. |

Current version of email regex don't have support for hyphen(-). I have updated the existing regex which has duplicate slash symbol twice in first square bracket, which is redundant.
Executed some test cases here: https://regex101.com/r/qiNqNc/1