Better explain with an example.
This is the text:
<li>hello
THE WORDS
</li>
<li> cruel </li>
<li> world THE WORDS </li>
I want to find lines with <li>and ends with </li>and contains THE WORDS. I expect that will match only <li> hello THE WORDS </li>and <li> world THE WORDS </li>.
What I tried: (?s)<li>.*?(THE WORDS).*?</li>
In this case, the second coincidence <li> cruel </li> <li> world THE WORDS </li>.
I am using Sublime Text.
source
share