Difference between revisions of "regex guide"
From thelinuxwiki
(→special chacters) |
(→special chacters) |
||
Line 5: | Line 5: | ||
Most regular expression flavors treat the brace { as a literal character, unless it is part of a repetition operator like a{1,3} | Most regular expression flavors treat the brace { as a literal character, unless it is part of a repetition operator like a{1,3} | ||
+ | |||
+ | Some flavors also support the \Q…\E escape sequence. All the characters between the \Q and the \E are interpreted as literal characters. E.g. \Q*\d+*\E matches the literal text *\d+*. |
Revision as of 23:07, 13 May 2017
special chacters
\ ^ $ . | ? * + ( ) [ {
Most regular expression flavors treat the brace { as a literal character, unless it is part of a repetition operator like a{1,3}
Some flavors also support the \Q…\E escape sequence. All the characters between the \Q and the \E are interpreted as literal characters. E.g. \Q*\d+*\E matches the literal text *\d+*.