QRegExp rx("\\btest\\b"); rx.indexIn("this is a test string"); QString captured = rx.cap(1); std::string capturedstr = captured.toUtf8().constData(); std::cout << capturedstr;
I wanted the above test to print and match the test word in a string, but it doesn't seem to be that way. Can anyone shed some light here? Using QT.
Dave z
source share