I write regular expression to grab all ref links from html
QRegExp bodylinksrx("(<a\\s+href\\s*=\\s*[^<>]*\\s*>[^<>]*</a>)");
QStringList bodylinks;
pos = 0;
while ((pos = bodylinksrx.indexIn(htmlcode, pos)) != -1)
{
bodylinks << bodylinksrx.cap(1);
pos += bodylinksrx.matchedLength();
}
I recieve list as result:
("<a href="http://somehref" class="someclass">href text...</a>", "<a href="http://somehref" class="someclass">href text...</a>", ......")
But I need receive list with only "http://somehref" "href text..." "http://somehref" "href text..." ....