I'm beginner in regular expressions and I want to cut some text placed beeween two other words. I'm using QT to do it. Some exapmle:
<li class="wx-feels">
Feels like <i><span class="wx-value" itemprop="feels-like-temperature-fahrenheit">55</span>°</i>
</li>
I want to get
Feels like <i><span class="wx-value" itemprop="feels-like-temperature-fahrenheit">55</span>°
From code above, sespecially a number
, my idea was to cut whole line from text first and then search it for nubers, but I cannot recover it from whole text.55
I typed somthing like that:
QRegExp rx("(Feels like <i><span class=\"wx-value\" itemprop=\"feels-like-temperature-fahrenheit\">)[0-9]{1,3}(</span>°</i>)");
QStringList list;
list = all.split(rx);
Where all
is a whole text, but a list contains only those substrings I didn't wanted, is there a posibity split QString into three pieces?
First - text at the beginning (which I don't want)
Second - wanted text
Third - rest of text?