'Extract strings inside double quotes with QRegularExpression
I have a string like below:
on prepareFrame
go to frame 10
goToNetPage "http://www.apple.com"
goToNetPage "http://www.cnn.com"
etc..
end
I want to extract all the urls from this string by using QRegularExpression. I've already tried:
QRegularExpression regExp("goToNetPage \"\\w+\"");
QRegularExpressionMatchIterator i = regExp.globalMatch(handler);
while (i.hasNext()) {
QRegularExpressionMatch match = i.next();
QString handler = match.captured(0);
}
But this not working.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
