"TOTAL : <COUNT> LINE."
I want split only <COUNT> with QRegExp, how can do this ?
"TOTAL : <COUNT> LINE."
I want split only <COUNT> with QRegExp, how can do this ?
Try the following code:
Qt Code:
if (rx.indexIn(line1) != -1) { qDebug() << "count in line1 = " << rx.cap(1); }To copy to clipboard, switch view to plain text mode
The important thing are the parentheses around "(\\d+)", which capture the matching text. You can access this text with cap() as shown.
Cheers,
Burkhard
Last edited by jpn; 3rd August 2008 at 19:21. Reason: missing [code] tags
tebessum (3rd August 2008)
Bookmarks