Username/^[a-z0-9_-]{3,16}$/
Password /^[a-z0-9_-]{6,18}$/
Email /^([a-z0-9_\.-] +)@([\da-z\.-]+)\.([a-z\.]{2,6})$/
/^[a-z\d]+(\ .[a-z\d]+)*@([\da-z](-[\da-z])?)+(\.{1,2}[a-z]+)+$/
URL/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \ .-]*)*\/?$/
IP address/((2[0-4]\d|25[0-5]| [01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)/
/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){ 3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/
HTML Tags/^<([a-z]+)([^<]+)*(?:>(.*)<\/\1>|\s+\/> ;)$/
Delete code\\comments(?
The range of Chinese characters in Unicode encoding/^[\u2E80-\u9FFF]+$/
The above is the detailed content of Summarize some commonly used regular expressions. For more information, please follow other related articles on the PHP Chinese website!