I have to parse specific html code from a website. Here is part of it:
<div class="_ss">
<div class="info">
First info.
</div>
<div class="info">
Second info.
</div>
<div class="info">
Third info.
</div>
</div>
I've defined a regular expression as follows:
QRegExp rx("<div class=\"info\">(.+)</div>");
It currectly matches all blocks but the matched text includes all the subsequent blocks. For instance, in the case of Second
, it returns:
<div class="info">
Second info.
</div>
<div class="info">
Third info.
</div>
</div>
I thought i can just add ?
to my regex to get the planned result:
QRegExp rx("<div class=\"info\">(.+?)</div>");
However, using this regex results in no match at all.