Positive Lookahead(?=\bfoo\b) \ban ASCII word boundary
foothe literal text foo (case sensitive) \ban ASCII word boundary
\w+any word character, repeated at least once
Comment: match the first word
.*any character (except for line terminators), repeated any number of times
Comment: if there's something in the middle of the two words
Positive Lookahead(?=\bbar\b) \ban ASCII word boundary
barthe literal text bar (case sensitive) \ban ASCII word boundary
\w+any word character, repeated at least once
Comment: match the second word