[Qt-interest] Multiplied spaces by QRegExp

M. Bashir Al-Noimi mbnoimi at gmx.com
Fri Apr 16 19:04:24 CEST 2010


Hi All,

I never tried to use QRegExp before but today I want to use it for 
manipulating text files. My procedure is so easy:

*I want to remove any multiplied spaces from specific string.*

For example:

" This is   my  source"

modified to:

" This is my source"


I tried to run this snippet but it didn't work! could you help me please?

QString str =" This is   my  source";
str.remove(QRegExp("[\" \"]+"));


*PS.*

I used this exp. in Lex successfully.


-- 
Best Regards
Muhammad Bashir Al-Noimi
My Blog: http://mbnoimi.net

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100416/69d16a31/attachment.html 


More information about the Qt-interest-old mailing list