The domain name format is as follows:
A domain name is composed of a specific character set, English letters, numbers, and "-" (that is, a hyphen or minus sign) of Chinese Characters in different countries, but cannot start or end with "-". "-" cannot appear consecutively. The domain name is case-insensitive. The domain name can contain up to 60 bytes (including the suffix. com,. net, and. org ).
/^ [A-z] ([a-z0-9] * [-_]? [A-z0-9] +) * @ ([a-z0-9] * [-_]? [A-z0-9] +) + [\.] [a-z] {2, 3} ([\.] [a-z] {2 })? $/I;
/Content/I forms a case-insensitive regular expression;
^ Match starts
$ Match ended
[A-z] the e-mail prefix must start with an English letter
([A-z0-9] * [-_]? [A-z0-9] +) * and _ a_2, aaa11, _ 1_a_2 match, and a1 _, aaff_33a _, a _ aa does not match, if it is a null character, but also match, * Indicates 0 or more.
* Indicates 0 or more characters.
[A-z0-9] * matches 0 or more English letters or numbers
[-_]? Match 0 or 1 "-" because "-" cannot appear continuously
[A-z0-9] + matches one or more English letters or numbers because '-' cannot end
@ There must be @
([A-z0-9] * [-_]? [A-z0-9] +) + see above ([a-z0-9] * [-_]? [A-z0-9] +) * interpreted, but cannot be empty, + represents one or more.
[\.] Treats special characters (.) as common characters
[A-z] {2, 3} matches two to three English letters, generally com or net.
([\.] [A-z] {2 })? Match 0 or 1 [\.] [a-z] {2} (for example. cn, etc.) I do not know whether the last part of .com.cn is generally two. If not, Change {2} to {start word count, End Word Count}