a friend of mine is having a problem with regular expressions. He basically has this HTML code:
<a>I don't want this</a>
startString
test1
<a>I want this1</a>
test2
<a>I want this2</a>
endString
gibberish
<a>I don't want this</a>
startString
test1
<a>I want this3</a>
test2
<a>I want this4</a>
endString
gibberish
<a>I don't want this</a>
Like I wrote in the headline, he currently uses 2 regexes to get the "I want this" strings in the code above:
(?<=startString).+?(?=endString)
<a>(.+?)</a>
He now wants to combine these 2 into one regex that does the same. Could anybody explain if this is possible and if it is, how to do it?
Thank you!