当前位置:网站首页>Regular expression integer positive integer some basic expressions

Regular expression integer positive integer some basic expressions

2022-07-07 14:02:00 It is small new


1  Find nonnegative integer (java We need two of them \\)
  0|([1-9][0-9]*)
2  Matching positive integer 
 [1-9][0-9]*
3  Non positive integer 
  0|(-[1-9][0-9]*)
4  Negtive integer 
  -[1-9][0-9]*
5  Integers 
   0|(-?[1-9][0-9]*)
6  Nonnegative floating point number ( There can be 0)
^\\d+(\\.\\d+)?$
7  Positive floating point 
^[1-9]+(\\.\\d+)?$  ^\\d+(\\.\\d+)?$
8  Non positive floating point number ( There can be 0)
^-\\d+(\\.\\d+)?$   ^-\\d+(\\.\\d+)?$
9  Negative floating point number 
^-[1-9](\\.\\d+)?$
10  Floating point numbers 
^[1-9]+(\\.\\d+)?$
11  from   Numbers 、26 A string of English letters 
[0-9a-zA-Z]+
 intermediate 
1  The length is 8-10 The user password of ( Start with a letter 、 Numbers 、 Underline )
^[a-zA-Z][a-zA-Z0-9_]{7,9}
2  Verify that the input can only be Chinese characters 
^[\\u4Eoo-\\u9FFF]+
3  Email verification 
^[http:\\]?[www.]?\\[email protected]\\w+\\.[a-z]{2,}$
4 URL Address verification 
^[a-zA-z]+(\\w+(-\\w+)*)(\\.(\\w+(-\\w+)*))*(\\S*)?$

5  Simple ID number verification 
^[1-9]//d{5}(18|19|20|(3\\d))\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]&

原网站

版权声明
本文为[It is small new]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202130616018568.html