Regular expression quick start guide

From TBwiki
Revision as of 00:12, 3 September 2009 by Ka-Lok Yeung (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Regular Expression PatternExplanations
^Matches beginning of a line
$Matches the end of a line
[characters]Matches any single character between the brackets
re1|re2Match either re1 or re2
re*Matches zero or more occurrences of re
re+Matches one or more occurrences of re
re?Matches zero or one occurrences of re
Re{m,n}Matches at least “m” and at most “n” occurrences of re
(...)Parentheses are used to group regular expressions
\0, \1, \2, ...Substitute the value matched by the nth grouped sub-expression, used in remapped fields.
Personal tools