regex guide

From thelinuxwiki
Revision as of 23:07, 13 May 2017 by Nighthawk (Talk | contribs)

Jump to: navigation, search

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+*.