1 / 1
文档名称:

Regular Expressions Cheat Sheet v1 (AddedBytes)[RegEx] #.pdf

格式:pdf   页数:1
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

Regular Expressions Cheat Sheet v1 (AddedBytes)[RegEx] #.pdf

上传人:bolee65 2013/12/12 文件大小:0 KB

下载得到文件列表

Regular Expressions Cheat Sheet v1 (AddedBytes)[RegEx] #.pdf

文档介绍

文档介绍:Anchors Quantifiers Groups and Ranges
^ Start of string * 0 or more . Any character except
\A Start of string + 1 or more new line (\n)
$ End of string ? 0 or 1 (a|b) a or b
\Z End of string {3} Exactly 3 (...) Group
\b Word boundary {3,} 3 or more (?:...) Passive Group
\B Not word boundary {3,5} 3, 4 or 5 [abc] Range (a or b or c)
\< Start of word [^abc] Not a or b or c
\> End of word [a-q] Letter between a and q
Quantifier Modifiers
[A-Q] Upper case letter
between A and Q
Character Classes "x" below represents a quantifier
[0-7]
x? Ungreedy version of "x" Digit between 0 and 7
\n nth group/subpattern
\c Control character
Note: Ranges are inclusive.
\s White space Escape Character
\S Not white space
Pattern Modifiers
\d Digit \ Escape Character
\D Not digit
g
\w Word Global match
i
\W Not word Metacharacters (must be escaped) Case-insensitive
m
\x Hexadecimal digit Multiple lines
^ [ . s
\O Octal digit Treat string as single line
$ { * x ments and
( \ + white space in pattern
POSIX
) | ? e Evaluate replacement
< > U Ungreedy pattern
[:upper:] Upper case letters
[:lower:] Lower case letters
[:alpha:] All letters Special Characters String Replacement (Backreferences)
[:alnum:] Digits and letters
[:digit:] Digits \n New line $n nth non-passive group
[:xdigit:] Hexadecimal digits \r Carriage return $2