What is the most efficient expression to solve finding context between multiple similar lazy quantifiers on a multi line.
I’m using HTML as the test subject so it is easier to comprehend rather the true format (symbols and character bytes), otherwise would be using a Xpath/DOM!
Sample data:
<div>
Testing 1234
<div>Testing1234</div> and testing
<div>Testing1234</div> testing 1234
</div>
Desired result:
Testing 1234
<div>Testing1234</div> and testing
<div>Testing1234</div> testing 1234
PCRE Expressions
Base: /(<div>)(.*?)(<\/div>)/
Non capturing group: /(<div>)((?:<div>.*?<\/div>).*?)(<\/div>)/