17种正则表达式
"^\\d+$" //非负整数(正整数+0)"^**$" //正整数
"^((-\\d+)|(0+))$" //非正整数(负整数+0)
"^-**$" //负整数
"^-?\\d+$" //整数
"^\\d+(\\.\\d+)?$" //非负浮点数(正浮点数+0)
"^((+\\.**)|(**\\.+)|(**))$" //正浮点数
"^((-\\d+(\\.\\d+)?)|(0+(\\.0+)?))$" //非正浮点数(负浮点数+0)
"^(-((+\\.**)|(**\\.+)|(**)))$" //负浮点数
"^(-?\\d+)(\\.\\d+)?$" //浮点数
"^+$" //由26个英文字母组成的字符串
"^+$" //由26个英文字母的大写组成的字符串
"^+$" //由26个英文字母的小写组成的字符串
"^+$" //由数字和26个英文字母组成的字符串
"^\\w+$" //由数字、26个英文字母或者下划线组成的字符串
"^[\\w-]+(\\.[\\w-]+)*@[\\w-]+(\\.[\\w-]+)+$" //email地址
"^+://(\\w+(-\\w+)*)(\\.(\\w+(-\\w+)*))*(\\?\\S*)?$" //url
页:
[1]