title: Matching Negative Sequence
body: <p>I want to match text between word1 and first occurrence of word2. What's the best way to do that, considering that text may include newline characters? Is there a pattern like this: (word1)(not word2)*(word2)?</p>