I have the following HTML string:
<span class='together'>line one,<br><span class='indent'>line two.</span><br>Line three,<br><span class='indent'>line four,<br>line five,<br>line six,<br>line seven;<br>line eight.<br>Line nine;<br>line ten,<br>line eleven,<br>line twelve.</span><br>Line thriteen,<br><span class='indent'>line fourteen,<br>line fifteen,<br>line sixteen,<br>line seventeen,<br>line eighteen.</span></span>
I am trying to find a regex expression that will find all the <br>
's that are between the <span class='indent'>
and it's closing </span>
. The <span class='together'>
encapsulates the whole sting and should just be ignored.
At the moment the best I can do is: <span class='indent'>.*?(<br>).*?<\/span>
which doesn't work at all. The first <br>
this grabs is outside of the <span>
and then it skips over a bunch of other <br>
's that I want (See here).
Is this possible? Should I instead use <span class='indent'>(.*?)\<\/span>
and then parse the captured group later?
As you can tell my regex knowledge is pretty limited.