Thank you JPN. It helps:
see regexp1.png
Now experiencing problems while splitting the founded expression(number1 / number2 into QStringList "number1" , "number2" ) using Qstring str.split(" \ / ") code line:
see regexp10.png.
Probably, I' ve made a mistake, but
I can not retrieve correct results from help code example also:
http://doc.trolltech.com/4.4/qregexp.html#capturedTexts :
see regexp2.png
How can it be possible to cut founded end extracted( thks to JPN) regular expression into
QStringList by
Qstring str.split(..)
or
Qregexp rx;
QStringList rx.capturedTexts();
or any other way?
that code works
or I didn't understand something?Qt Code:
To copy to clipboard, switch view to plain text mode
You are right. It works. I couldn't see it becouse hadn't iterated through returned QStringList object properly.
You Returned it to... QDebug(). What is it and waht you could see then ?
the result of this code isin your case("number1", "number2")
Qt Code:
To copy to clipboard, switch view to plain text mode
Bookmarks