I need to validate whether my regex is correct for below scenario. Suggestion's if the regex is correct:
The local-part of the email address may use any of these ASCII characters.[4] RFC 6531 permits Unicode characters beyond the ASCII range:
- Uppercase and lowercase English letters (a–z, A–Z) (ASCII: 65–90, 97–122)
- Digits 0 to 9 (ASCII: 48–57)
- These special characters:
! # $ % & ' * + - / = ? ^ _
{ | } ~ (limited support) - Character . (dot, period, full stop) (ASCII: 46) provided that it is not the first or last character, and provided also that it does not appear two or more times consecutively (e.g. [email protected] is not allowed).
- Special characters are allowed with restrictions. They are:
- Comments are allowed with parentheses at either end of the local part; e.g. "john.smith(comment)@example.com" and "(comment)[email protected]" are both equivalent to "[email protected]".
- International characters above U+007F are permitted by RFC 6531, though mail systems may restrict which characters to use when assigning local parts.
The Regex:
^[a-z0-9][-a-z0-9.!#$%&'*+-=?^_`{|}~\/]+@([-a-z0-9]+\.)+[a-z]{2,5}$
.net
\$\endgroup\$.net
is not a language, it's a framework. \$\endgroup\$