My current regex pattern:
(?s)]*>(.*?)\bsomethin\b(.*?)
HTML fragment to search:
<p>somethin</p>
<p>nuthin</p>
If I run it against the html fragment above it will match <p>somethin</p>
which is what I need.
However, if I change the pattern embedded string from "somethin" to "nuthin" it will match both p tags in their entirety when I only want the second tag set. The behavior is the same if I nest the p tags rather than having them on a single line and this is also desired.
Thanks.
before nuthin all the way to the
after somethin. – Asmor Nov 08 '11 at 16:45