Big data learning monk 2022-02-13 07:16:02 阅读数:64
^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$
[a-zA-Z0-9][-a-zA-Z0-9]{
0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{
0,62})+\.?
[a-zA-z]+://[^\s]* or ^http://([\w-]+\.)+[\w-]+(/[\w-./?%&=]*)?$
^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{
8}$
^(\(\d{
3,4}-)|\d{
3.4}-)?\d{
7,8}$
\d{
3}-\d{
8}|\d{
4}-\d{
7}
((\d{
11})|^((\d{
7,8})|(\d{
4}|\d{
3})-(\d{
7,8})|(\d{
4}|\d{
3})-(\d{
7,8})-(\d{
4}|\d{
3}|\d{
2}|\d{
1})|(\d{
7,8})-(\d{
4}|\d{
3}|\d{
2}|\d{
1}))$)
(^\d{
15}$)|(^\d{
18}$)|(^\d{
17}(\d|X|x)$)
^[a-zA-Z][a-zA-Z0-9_]{
4,15}$
^[a-zA-Z]\w{
5,17}$
^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9]{
8,10}$
^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{
8,10}$
^\d{
4}-\d{
1,2}-\d{
1,2}
^(0?[1-9]|1[0-2])$
^((0?[1-9])|((1|2)[0-9])|30|31)$
In other languages ,\ Express : I want to insert a normal ( Literal ) The backslash , Please don't give it any special meaning .
stay Java in ,\ Express : I want to insert a backslash of a regular expression , So the characters that follow are of special significance .
therefore , In other languages ( Such as Perl), A backslash \ It's enough to have the effect of escaping , And in the Java In regular expressions, there need to be two backslashes in order to be parsed into escape functions in other languages . It can also be simply understood in Java In the regular expression of , Two \ Represents one of the other languages \, That's why the regular expression for a number is \d, A normal backslash is \.
System.out.print("\\"); // Output is \
System.out.print("\\\\"); // Output is \\
copyright:author[Big data learning monk],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130716000129.html