For questions about email verification, please take a look at if (! Ereg (& quot; ^ [a-zA-Z0-9 _.] + @ ([a-zA-Z0-9 _] + .) + [a-zA-Z] {2, 3 }$ & quot;, $ email) {help me to see if this is correct? Can I verify the email addresses of all rules? Gsgsg@xx.comgsdg.ee @ xx.com.cntert_erw@xx.com in the mailbox is generally underlined "_ questions about mailbox verification, please help look at the Master
If (! Ereg ("^ [a-zA-Z0-9 _.] + @ ([a-zA-Z0-9 _] +.) + [a-zA-Z] {2, 3} $", $ email )){
Can you help me see the problem? Can I verify the email addresses of all rules?
Gsgsg@xx.com
Gsdg.ee@xx.com.cn
Tert_erw@xx.com
In addition, the email address is usually underlined with an underscore (_). However, someone suggested that the email address contains an underscore, how can I modify the above code so that the email address with the hyphen "-" can pass?
Rgter-fsf@xx.com
------ Solution --------------------
If (! Ereg ("^ [a-zA-Z0-9 _.-] + @ ([a-zA-Z0-9 _] +.) + [a-zA-Z] {2, 3} $", $ email )){