We receive HTML fragments that contain, among other things, specific questions with a response. Each pair is (hopefully) always separated by <br/>
.
So given this string:
random nonsense<br/> What is your name bob<br/><more random nonsense<br/>
The question is “what is your name”, and the response is “bob”. After a lot of googling, the best I can some up with is:
(?<=What is your name)(.*)(?=<br/>)
But that selects everything until the last occurence of </br>
. How do I make it stop at the first?
Demo