Help in constructing a QRegExp
-
wrote on 19 Nov 2013, 16:23 last edited by
I want to remove ".bmp" from my file name using QRegExp. My file name is formatted as "Alphanumerics.bmp".
Could someone help me with constructing QRegExp for this?How can I use QRegExp for removing a part of QSting ?
Regards,
-
@
QString mystring("alphanumerics.bmp");mystring.replace(".bmp", "");
@Done :) No need for regexp here. Alternatively, you can get the extension using QFileInfo::suffix().
1/2