我试图通过以下链接了解验证电子邮件 - http://www.w3schools.com/PHP/php_form_url_email.asp
我知道 \w 表示字母数字字符,即 [0-9a-zA-Z] 并且 - 也应该表示包含“-”。我很困惑,因为他们在“。”之后使用了它。同样,我认为在“。”之后 只能出现字母数字字符,例如 "com" 、 "org" 等。
\w 解释
\w match any word character [a-zA-Z0-9_]
Run Code Online (Sandbox Code Playgroud)
\w\- 解释
\w\-
\w match any word character [a-zA-Z0-9_]
\- matches the character - literally
Run Code Online (Sandbox Code Playgroud)
\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}\b
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13862 次 |
| 最近记录: |