Details
-
Suggestion
-
Resolution: Done
-
Not Evaluated
-
4.7.1
-
None
Description
QString c = "We must be <b>bold</b>, very <b>bold</b>!"; QRegExp r; r.setMinimal(true); r.setPattern("<b>(.*)</b>"); c.indexOf(r); qDebug() << r.cap(1); r.setPattern("<b>(.*)</b>.*!"); c.indexOf(r); qDebug() << r.cap(1);
got:
"bold"
"bold</b>, very <b>bold"
expected:
"bold"
"bold"
When there is more than one asterisk, minimal matching should be applied to the one in matching group.