I have something like this: ...
<div class="viewport viewport_h" style = "overflow: hidden;" >
<div id="THIS" class="overview overview_h">
<ul>
<li>some txt to be captured</li>
<li>some txt to be captured</li>
<li>some txt to be captured</li>
</ul>
<div>
" some text to be captured"
</div>
</div>
</div>
"some text not to be captured"
</div>
<div class="scrollbar_h">
<div class="track_h"></div>
...
I want to capture everything inside div
with id=THIS
. I'm using somthing like:
@<div class="viewport viewport_h" style = "overflow: hidden;" >\s*<div class="overview overview_h">\s*(?:<ul>)?([\s\d\w<>\/()="-:;‘’!,:]+)(?:</div>)+?@
The last (?:</div>)+?
is to make it non-greedy for further "</div>" but that doesn't work and captuers all other following </div>
. :(