[Qt-interest] Multiplied spaces by QRegExp
Denis Akhmetzyanov
dakhmetzyanov at smartlabs.tv
Fri Apr 16 18:29:47 CEST 2010
Hi
You could use QString::simplified() instead.
2010/4/16 M. Bashir Al-Noimi <mbnoimi at gmx.com>
> 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
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
--
Best regards,
Denis Akhmetzyanov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100416/2bbd1c7c/attachment.html
More information about the Qt-interest-old
mailing list