Tutorial
Tools & Languages
Examples
Reference
Matching a Six-Letter Word Containting "Cat"
\b
(?=
\w
{6}
\b
)
\w
{0,3}
cat
\w
*
Options: case insensitive
Assert position at a word boundary
Assert that the regex below can be matched, starting at this position (positive lookahead)
Match a character that is a "word character" (letters, digits, etc.)
Exactly 6 times
Assert position at a word boundary
Match a character that is a "word character" (letters, digits, etc.)
Between zero and 3 times, as many times as possible, giving back as needed (greedy)
Match the characters "cat" literally
Match a character that is a "word character" (letters, digits, etc.)
Between zero and unlimited times, as many times as possible, giving back as needed (greedy)
Welcome
Tutorial
Tools and Languages
Examples
Reference
About This Site
Download and Print