Tutorial
Tools & Languages
Examples
Reference
Matching a Complete Line Containing One out of Several Words
^
.
*
\b
(
one
|
two
|
three
)
\b
.
*
$
Options: ^ and $ match at line breaks
Assert position at the start of the string or after a line break character
Match any single character that is not a line break character
Between zero and unlimited times, as many times as possible, giving back as needed (greedy)
Assert position at a word boundary
Match the regular expression below and capture its match into backreference number 1
Match either the regular expression below (attempting the next alternative only if this one fails)
Match the characters "one" literally
Or match regular expression number 2 below (attempting the next alternative only if this one fails)
Match the characters "two" literally
Or match regular expression number 3 below (the entire group fails if this one fails to match)
Match the characters "three" literally
Assert position at a word boundary
Match any single character that is not a line break character
Between zero and unlimited times, as many times as possible, giving back as needed (greedy)
Assert position at the end of the string or before a line break character
Welcome
Tutorial
Tools and Languages
Examples
Reference
About This Site
Download and Print