1<?PHP2 /*3 non-printable characters4 \c----{4E00--9FA5} \x----{a-za-z}5 \f----Match a page break6 \ n----match a line break7 \ r----Match a carriage return line8 \s----matches any whitespace character, including spaces, tabs, page breaks9 \s----matches any non-whitespace character \s complementTen \ t----match a tab One \v----Match a vertical tab A - Special Characters - $-----Matches the end position of the input string the ^-----Match the start of the input string - ()----marks the start and end positions of a subexpression - *-----match the preceding subexpression 0 or more times - +-----Match the preceding subexpression one or more times + .-----match any single character except a newline character - \-----To mark the next character or special character, or literal character, or backward reference, or octal escape character + {-----The start of a tag qualifier expression A |-----indicate a choice between the two items at - Qualifier - * matches the preceding subexpression 0 or more times. For example, zo* can match "z" and "Zoo". * Equivalent to {0,}. - + matches the preceding subexpression one or more times. For example, ' zo+ ' can match "Zo" and "Zoo", but not "Z". + equivalent to {1,}. - ? Matches the preceding subexpression 0 or one time. For example, "Do (es)?" can match "do" in "do" or "does".? Equivalent to {0,1}. - {n} n is a non-negative integer. Matches the determined n times. For example, ' o{2} ' cannot match ' o ' in ' Bob ', but can match two o in ' food '. in {n,} n is a non-negative integer. Match at least n times. For example, ' o{2,} ' cannot match ' o ' in ' Bob ', but can match all o in ' Foooood '. ' O{1,} ' is equivalent to ' o+ '. ' O{0,} ' is equivalent to ' o* '. - {n,m} m and n are non-negative integers, where n <= m. Matches at least n times and matches up to M times. For example, "o{1,3}" will match the first three o in "Fooooood". ' o{0,1} ' is equivalent to ' O? '. Note that there can be no spaces between a comma and two numbers.
The Regular of PHP