Regular expression Formula _ learning regular friends is worth a look _ regular expression

Source: Internet
Author: User
Signed on the Internet too much of the introduction is a fierce essay, while looking at the understanding can help memory not. Also by Wubi font root table formula "managed to watch 32 Jin ..." Inspiration,
Try "Regular Expression mnemonics" also known as "regular Limerick", version 0.1, absolutely original, counterfeit must investigate,:
Note: This article is only for the study of the regular time in order to facilitate memory, can not replace the system and comprehensive learning process, errors and omissions, please correct me!
Is in fact also snobbish, cutting the point to put the money; (refers to the start symbol ^ and the end sign $)
Special symbols can not recognize, get a backward bar to guide; \* and other special symbols)
Behind the back with the small W, the number of letters to express; (\w with digital letters; \d with numbers)
The back of the bar with small d, only numbers to indicate;
Behind the bar with small a, alarm symbol beep;
Behind the bar with small B, word demarcation or backspace;
Behind the back with small t, the tab symbol is very clear;
The back of the bar with small r, carriage return symbol to know;
Behind the bar with small s, the space symbol is very important;
Lower case with the upper case, too much is really not;
Behind the back with the Big W, the letter number aside;
Behind the bar with big S, blank also on the sidelines;
Behind the bar with Big D, the number from the sidelines;
The back of the box with Big B, does not include the beginning and end;

Single character to repeat, three symbols to help; )
0 Stars plus 1 to infinity, the question mark only 0 and 1; (* table 0-n;+ table 1-n;? Table 0-1 repeats)
More knowledge in curly braces, strong repetitive operation; ({n} {n} {n,m})
To repeat the string, enclose it in the garden; ((ABC) {3} indicates that the string "abc" Repeats 3 times)
Special set customization, brackets to help you;
Escape symbol not workable, one to line up;
There are so many of them out of line, please come and help me. ([1-5])
A sharp point is placed in brackets, and the definition of antisense is powerful; ([^a] refers to any character other than "a")
1 vertical function is not small, the two sides are replacing each other; (the keyboard is the same key as "\")
1 vertical energy used many times, complex definition is very convenient;
Garden brackets, multi-purpose;
A reverse reference to the specified group, with numeric rows corresponding to it; (The number "1" in "\b (\w+) \b\s+\1\b" refers to the preceding "(\w+)")
Support Group name customization, question mark with angle bracket, ("(? <word>\w+)" "\w+" defined as group, group named "Word")
The square bracket, uses many, the position designation depends on it;
Question mark equals string, positioned before the string ("\b\w+ (? =ing\b)" Locates the string before "ing")
To locate a string, insert a less than sign in the middle, ("(? <=\bsub) \w+\b" to the string following the "sub")
The question mark adds an exclamation point, followed by a string of strings;
Phper all know,! is to take the opposite meaning;
Back not with this string, all meet to report; ("\w*d!" OG) \w* "," dog "does not meet," do "in accordance with"
The question mark is less than the exclamation point followed by string strings;
The front does not put this string, all conforms to report;
Dot asterisk is greedy, add a question mark not greedy;
The plus question mark has the guarantee, at least repeat more than once;
Two question mark old rules, 0 times 1 times round;
Curly braces followed by a? , greed becomes not greedy;
There are a lot of not fit, waiting to be added later.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.