Today, I saw a regular expression, and I am going to learn about it: In fact, regular expressions are also Snoop, And you can sharpen your head to carry your money. (It refers to the starting symbol ^ and the ending symbol $)
Special symbols cannot be recognized. You can use inverted bars to lead the way. (refers to special symbols such)
Backward bars are represented by w and numbers (w and numbers, and d and numbers)
Backward bars are followed by small d, which is only represented by numbers;
The reverse bar is followed by a, and an alarm symbol is opened;
Backward bars are followed by Small B, and the word is split or unsigned;
The inverted bar is followed by a small t, and the tabulation symbol is clear;
The reverse bar is followed by a small r. The carriage return symbol is displayed;
The inverted bars are followed by small S. The space symbol is very important;
The lower-case password and upper-case password are too many;
The back of the upbar is followed by a large number of characters and numbers;
The reverse bars are followed by the big S, and the blank space is on the edge; Backward bars are followed by Big D, and numbers are now on the edge; The inverted box is followed by a large B, excluding the start and end;
A single character must be repeated. Three symbols are used to help;
0 stars plus 1 to infinity, the question mark is only 0 and 1; (* Table 0-n; + Table 1-n ;? Table 0-1 repetition)
You can learn more in curly brackets and have a strong ability to repeat operations; To repeat the string, enclose the string. (abc) {3} indicates that the string "abc" is repeated three times)
Special set customization, brackets to help you;
Escape characters do not work, so they are queued one by one;
There are so many issues to be unable to cope; Parentheses ([^ a] indicates any character except ")
1. The vertical function is not small, and the two sides are replaced by regular expressions. ("/" is the same key on the keyboard)
1. portrait can be used many times, and complicated definition is very convenient;
Garden brackets for multiple purposes;
Returns a reverse reference to a specified group. The number in the "B (w +) bs + 1b" column corresponds to the number. The number "1" references the previous "(w + )")
Custom group names are supported. question marks are added with Angle brackets. ("(? "W +" is defined as a group and the group name is "Word ")
Square brackets are used for multiple purposes, and all positions are specified based on it;
The equal sign of the question mark ("bw + (? = Ingb) "locate the string before" ing)
To locate the end of the string, insert a smaller sign in the middle; ("(? <= Bsub) w + B "locate the string after" sub )'
Add an exclamation point to the question mark, followed by a string;
All PHPer knows ,! It indicates the inverse;
If it is not followed by this string, it will all comply with the Report; ("w * d (?! Og) w * "," dog "does not match, and" do "Does) aM U5 %}
The question mark is less than the exclamation point, followed by a string;
If this string is not included in the previous section, it will all comply with the report;
The asterisk (*) is greedy and a question mark (*) is not greedy;
The plus sign has a guaranteed-performance question mark, which must be repeated at least once; There are two question marks in the old rule, one round for 0 times;
Followed by curly braces ?, Greedy becomes not greedy;
There are still a lot of installation failures, waiting for the future to increase