PHP Common Regular Expression code

Source: Internet
Author: User

is in fact also snobbish, cut the point to put the money; (refers to the beginning symbol ^ and the end sign $) 2 L. @4 t# N) ~ (B
Special symbols do not recognize, get a back bar to guide the way (refers to. * and other special symbols) 0 B4 W0} (D2 m) i) O
behind the back with the small W, the number of letters to express; (w with digital letters; d with numbers)
1 V3 r& A + B + K T X;? Behind the bar with small d, only numbers to indicate;
% K,/D7]$ D9 E0 w-a back with small a, alarm symbol beep;! X) H6 B K3 i "v% | ' _
behind the bar with small B, word demarcation or backspace; P6 ^! u) o ' ^ o
behind the back with the small T, the tab symbol is very clear;& H5 X (m+ _ (k& y
behind the back with small R, carriage return symbol known;)] " ~4 _)}2 W; F
behind the back with small s, the space symbol is very important;% D0 d+ R6 _ (N4? 4 M
lower case with a capital, a lot of it is really not got; 2 ["R5}7 U1 {, M6 J" v. H4 a# i
behind the back with the Big W, the letter number aside;
1 U7 ~0 {1 |8 G7 ' # P6 Z back with big S, white space is also on the sidelines; 5 U ' A (with $ B9 M (d0 p# G
behind the bar with Big D, the number from the sidelines;
9 L6 [4 [(K5 A) V4 _ The back of the box with Big B, excluding the beginning and end;% L2 S) ~;] S4 r/h: G2 J

1 y '?; c% @ "J6 H single character to repeat, three symbols to help; ) $ + Q3 F8 G) B4 T; w# Q '
0 stars plus 1 to infinity, the question mark only 0 and 1; (* table 0-n;+ table 1-n;? Table 0-1 repetitions) ']4 G2 L:] "V
more learning in curly braces, strong repetitive operation ({n} {N,} {n,m}) 8 y/y;] 2 V (Q0 U9 o$ c
to repeat the string, enclose it in the garden; ((ABC) {3} indicates that the string "abc" repeats 3 times)
! Q ' j! |8 s ' l9 I special set Custom, bracket to help you;& R5 D9 i+ G7?
escape symbol not workable, one to line up;
% Z (! | ' y, Z2 e$ i# p3 S0 ~ "-Q is really too much to row, cross bar please help a busy; ([1-5]) ' X, d y, o# n e* P
A sharp point is placed in brackets, and the definition of antisense is powerful; ([^a] refers to any character other than "a")
6 u/s: v;  [6 | I2 W9 O1 Vertical action is not small, the two sides are mutually replacement; (on the keyboard and "" is the same key)
# j! ' 3 F. r* |3 k# F1 can be used many times, complex definition is very convenient; 5 t+ B8 S ' |3 L. @8 Y8 Z0 o
Square brackets, multi-purpose;-y* K r! X8 W6 z+ C9 y1 u:g$ v$ F
A reverse reference to the specified group, with numeric rows corresponding to it; (The number "1" in "B (w+) bs+1b" refers to the preceding "(w+)") (O5 P "@& U8]7 L
Support Group name customization, question mark with angle bracket, ("(? <word>w+)" "w+" defined as group, group named "Word")
3 J. P2 G:t5 V9 B-bracket, with many uses, location designation depends on it;! L! Y6 W6; b* l+ W
question mark equals string, positioned before the string ("bw+ (? =ingb)" Locates the string before "ing")
! B7 ~5 X1 c:r, y to locate the string, insert a less than number in the middle, ("(? <=bsub) W+b" Locate the string after "sub")
8 I2 F1 Y2 R, J9 M1 J question mark add an exclamation point, followed by string strings;
1 m$ n%: d+ @9 1 O:yphper all know,! is to take the opposite meaning; (E% C; J "X:c q:m& T" M
back not with this string, all meet to report; ("W*d!" OG) w* "," dog "does not meet," do "in accordance with"
6 @9 T7 B7 f$ g (Z)} The question mark is less than the exclamation point followed by string strings;
! ~; E-n ' U5 o not put this string in front, all meet to report; 1 T i/? ' i3 m+ I2 x
dot asterisk is greedy, add a question mark not greedy; # o+ M "?: | ' E. v/t
the plus question mark has the guarantee, at least repeat more than once;
0 G9 e3 Y7 d! x9 g$ t& n Two question marks, 0 times 1 times; @* Q5 V ' E8 |/g
curly braces followed by a? , greed becomes not greedy;

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.