Tutorial
Tools & Languages
Examples
Reference
Two Words Near Each Other in a Any Order
\b
(?:
word1
\W
+
(?:
\w
+
\W
+
)
{1,6}
word2
|
word2
\W
+
(?:
\w
+
\W
+
)
{1,6}
word1
)
\b
Assert position at a word boundary
Match the regular expression below
Match either the regular expression below (attempting the next alternative only if this one fails)
Match the characters "word1" literally
Match a single character that is a "non-word character"
Between one and unlimited times, as many times as possible, giving back as needed (greedy)
Match the regular expression below
Between one and 6 times, as many times as possible, giving back as needed (greedy)
Match a single character that is a "word character" (letters, digits, etc.)
Between one and unlimited times, as many times as possible, giving back as needed (greedy)
Match a single character that is a "non-word character"
Between one and unlimited times, as many times as possible, giving back as needed (greedy)
Match the characters "word2" literally
Or match regular expression number 2 below (the entire group fails if this one fails to match)
Match the characters "word2" literally
Match a single character that is a "non-word character"
Between one and unlimited times, as many times as possible, giving back as needed (greedy)
Match the regular expression below
Between one and 6 times, as many times as possible, giving back as needed (greedy)
Match a single character that is a "word character" (letters, digits, etc.)
Between one and unlimited times, as many times as possible, giving back as needed (greedy)
Match a single character that is a "non-word character"
Between one and unlimited times, as many times as possible, giving back as needed (greedy)
Match the characters "word1" literally
Assert position at a word boundary
Welcome
Tutorial
Tools and Languages
Examples
Reference
About This Site
Download and Print