Regular expression quick start guide
From TBwiki
(Difference between revisions)
Ka-Lok Yeung (Talk | contribs) (Created page with '<table border="1" cellpadding="2"> <tr><th align="left" width="300">Regular Expression Pattern</th><th align="left">Explanations</th></tr> <tr><td>^</td><td>Matches beginning of …') |
Ka-Lok Yeung (Talk | contribs) |
||
Line 1: | Line 1: | ||
<table border="1" cellpadding="2"> | <table border="1" cellpadding="2"> | ||
− | <tr><th align="left" width=" | + | <tr><th align="left" width="250">Regular Expression Pattern</th><th align="left">Explanations</th></tr> |
<tr><td>^</td><td>Matches beginning of a line</td></tr> | <tr><td>^</td><td>Matches beginning of a line</td></tr> | ||
<tr><td>$</td><td>Matches the end of a line</td></tr> | <tr><td>$</td><td>Matches the end of a line</td></tr> |
Revision as of 23:12, 2 September 2009
Regular Expression Pattern | Explanations |
---|---|
^ | Matches beginning of a line |
$ | Matches the end of a line |
[characters] | Matches any single character between the brackets |
re1|re2 | Match 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. |