| Character |
Description |
| ^\d+$ |
// Match non-negative integer (positive integer + 0) |
| // Match integer ^\d+(\.\d+)?$ |
// Match non-negative floating point number (positive floating point number + 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 number |
| ^((-\d+(\.\d+)?)|(0+(\.0+)?))$ |
// Match non-positive floating point number (negative floating point number + 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 number |
| ^(-?\d+)(\.\d+)?$ |
// Match floating point number |
| ^[A-Za-z]+$????????? |
// Match a string consisting of 26 English letters |
| ^[A-Z]+$ ??? |
// Match a string consisting of uppercase 26 English letters |
| ^[a-z]+$ |
// Match a string consisting of lowercase 26 English letters |
| ^[A-Za-z0-9]+$ |
// Match a string consisting of digits and 26 English letters |
| ^\w+$ |
// Match a string consisting of digits, 26 English letters, or underscores |
| ^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$ |
// Match email address |
| ^[a-zA-z]+://match (\w+(-\w+)*)(\.(\w+(-\w+)*))*(\?\S*)?$ |
// Match URL |
| [\u4e00-\u9fa5] |
Regular expression to match Chinese characters |
| [^\x00-\xff] |
Match double-byte characters (including Chinese characters) |
| \n[\s| ]*\r |
Regular expression to match blank lines |
| /<(.*)>.*<\/>|<(.*)\/>/ |
Regular expression to match HTML tags |
| (^\s*)|(\s*$) |
Regular expression to match leading and trailing spaces |
| \w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)* |
Regular expression to match email addresses |
| ^[a-zA-z]+://(\w+(-\w+)*)(\.(\w+(-\w+)*))*(\?\S*)?$ |
Regular expression to match URLs |
| ^[a-zA-Z][a-zA-Z0-9_]{4,15}$ |
Match whether the account is valid (starting with a letter, allowing 5-16 bytes, allowing letters, numbers, underscores) |
| (\d{3}-|\d{4}-)?(\d{8}|\d{7})? |
Match domestic telephone numbers |
| ^[1-9]*[1-9][0-9]*$ |
Match Tencent QQ number |