July 2017
Intermediate to advanced
158 pages
3h 41m
English
Suppose we need to match an input that contains three complete words, start, middle, and end, separated by non-whitespace characters.
Consider using the following pattern with a lazy quantifier:
\bstart\b\S+?\bmiddle\b\S+?\bend\b
Instead of using the following pattern, our match will be faster if we use the preceding pattern:
\bstart\b\S+\bmiddle\b\S+\bend\b
Read now
Unlock full access