character | describe |
---|
^\d+$ | Match non-negative integers (positive integers + 0) |
//Matches the integer ^\d+(\.\d+)?$ | Match non-negative floating-point numbers (positive floating-point numbers + 0) |
^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$ | //Match positive floating-point numbers |
^((-\d+(\.\d+)?)|(0+(\.0+)?))$ | Match non-positive floating-point numbers (negative floating-point numbers + 0) |
^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$ | //match negative floating-point numbers |
^(-?\d+(\.\d+)?$ | //match floating-point numbers |
^[A-Za-z]+$ | Match a string of 26 English letters |
^[A-Z]+$ | Matches a string of 26 English letters |
^[a-z]+$ | Matches a string of 26 lowercase letters |
^[A-Za-z0-9]+$ | Match a string of numbers and 26 letters |
^\w+$ | Matches a string consisting of numbers, 26 letters, or underscores |
^\w-]+(\.[\w-]+)*@\w-]+(\.[\w-]+)+$ | //match email address |
^[a-zA-z]+://匹配(\w+(-\w+)*)(\.(\w+(-\w+)*))*(\?\S*)?$ | //match url |
[\u4e00-\u9fa5] | Regular expressions that match Chinese characters |
[^\x00-\xff] | Match double-byte characters (including Chinese characters) |
\n[\s| ]*\r | Regular expression that matches blank lines |
/<(.*)>.*<\/>|<(.*)\/>/ | Regular expressions that match HTML tags |
(^\s*)|(\s*$) | Regular expressions that match end-to-end spaces |
\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)* | Regular expression for matching email addresses |
^[a-zA-z]+://(\w+(-\w+)*)(\.(\w+(-\w+)*))*(\?\S*)?$ | Regular Expression Matching URL |
^[a-zA-Z][a-zA-Z0-9_]{4,15}$ | Match whether the account is legal (start with a letter, allow 5-16 bytes, allow alphanumeric underscores) |
(\d{3}-|\d{4}-)?(\d{8}|\d{7})? | Match domestic phone numbers |
^[1-9]*[1-9][0-9]*$ | Match Tencent QQ number |