OLD | NEW |
1 RE2 regular expression syntax reference | 1 RE2 regular expression syntax reference |
2 ------------------------------------- | 2 ------------------------------------- |
3 | 3 |
4 Single characters: | 4 Single characters: |
5 .» any character, including newline (s=true) | 5 .» any character, possibly including newline (s=true) |
6 [xyz] character class | 6 [xyz] character class |
7 [^xyz] negated character class | 7 [^xyz] negated character class |
8 \d Perl character class | 8 \d Perl character class |
9 \D negated Perl character class | 9 \D negated Perl character class |
10 [:alpha:] ASCII character class | 10 [:alpha:] ASCII character class |
11 [:^alpha:] negated ASCII character class | 11 [:^alpha:] negated ASCII character class |
12 \pN Unicode character class (one-letter name) | 12 \pN Unicode character class (one-letter name) |
13 \p{Greek} Unicode character class | 13 \p{Greek} Unicode character class |
14 \PN negated Unicode character class (one-letter name) | 14 \PN negated Unicode character class (one-letter name) |
15 \P{Greek} negated Unicode character class | 15 \P{Greek} negated Unicode character class |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 (?flags) set flags within current group; non-capturing | 53 (?flags) set flags within current group; non-capturing |
54 (?flags:re) set flags during re; non-capturing | 54 (?flags:re) set flags during re; non-capturing |
55 (?#text) comment NOT SUPPORTED | 55 (?#text) comment NOT SUPPORTED |
56 (?|x|y|z) branch numbering reset NOT SUPPORTED | 56 (?|x|y|z) branch numbering reset NOT SUPPORTED |
57 (?>re) possessive match of «re» NOT SUPPORTED | 57 (?>re) possessive match of «re» NOT SUPPORTED |
58 re@> possessive match of «re» NOT SUPPORTED vim | 58 re@> possessive match of «re» NOT SUPPORTED vim |
59 %(re) non-capturing group NOT SUPPORTED vim | 59 %(re) non-capturing group NOT SUPPORTED vim |
60 | 60 |
61 Flags: | 61 Flags: |
62 i case-insensitive (default false) | 62 i case-insensitive (default false) |
63 m» multi-line mode: ^ and $ match begin/end line in addition to begin/end t
ext (default false) | 63 m» multi-line mode: «^» and «$» match begin/end line in addition to begin/e
nd text (default false) |
64 s let «.» match «\n» (default false) | 64 s let «.» match «\n» (default false) |
65 U ungreedy: swap meaning of «x*» and «x*?», «x+» and «x+?», etc (default f
alse) | 65 U ungreedy: swap meaning of «x*» and «x*?», «x+» and «x+?», etc (default f
alse) |
66 Flag syntax is «xyz» (set) or «-xyz» (clear) or «xy-z» (set «xy», clear «z»). | 66 Flag syntax is «xyz» (set) or «-xyz» (clear) or «xy-z» (set «xy», clear «z»). |
67 | 67 |
68 Empty strings: | 68 Empty strings: |
69 ^ at beginning of text or line («m»=true) | 69 ^ at beginning of text or line («m»=true) |
70 $ at end of text (like «\z» not «\Z») or line («m»=true) | 70 $ at end of text (like «\z» not «\Z») or line («m»=true) |
71 \A at beginning of text | 71 \A at beginning of text |
72 \b at word boundary («\w» on one side and «\W», «\A», or «\z» on the other) | 72 \b at word boundary («\w» on one side and «\W», «\A», or «\z» on the other) |
73 \B not a word boundary | 73 \B not a word boundary |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 (*SKIP) NOT SUPPORTED | 364 (*SKIP) NOT SUPPORTED |
365 (*THEN) NOT SUPPORTED | 365 (*THEN) NOT SUPPORTED |
366 (*ANY) set newline convention NOT SUPPORTED | 366 (*ANY) set newline convention NOT SUPPORTED |
367 (*ANYCRLF) NOT SUPPORTED | 367 (*ANYCRLF) NOT SUPPORTED |
368 (*CR) NOT SUPPORTED | 368 (*CR) NOT SUPPORTED |
369 (*CRLF) NOT SUPPORTED | 369 (*CRLF) NOT SUPPORTED |
370 (*LF) NOT SUPPORTED | 370 (*LF) NOT SUPPORTED |
371 (*BSR_ANYCRLF) set \R convention NOT SUPPORTED pcre | 371 (*BSR_ANYCRLF) set \R convention NOT SUPPORTED pcre |
372 (*BSR_UNICODE) NOT SUPPORTED pcre | 372 (*BSR_UNICODE) NOT SUPPORTED pcre |
373 | 373 |
OLD | NEW |