[Qt-interest] QRexExp to find file in a string
Cole, Derek
dcole at integrity-apps.com
Fri Aug 26 21:53:08 CEST 2011
I have a string like
/home/dirs/somefile.txt
I want to use QRegExp to remove "somefile.txt" and replace it with "newstuff.abc"
QRegExp rx("/w*\\.txt$");
const char *DstFilename = newfile.replace(rx,"newstuff.abc").toStdString().c_str();
The above doesnt seem to work. Can someoen tell me whats wrong? Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110826/eb467d1f/attachment.html
More information about the Qt-interest-old
mailing list