[Qt-interest] Problem with qregexpr
Alexandre Beraud
aberaud at infflux.com
Mon Oct 5 17:05:27 CEST 2009
Hi,
If you use QRegExp::exactMatch(), then you don't need ^ and $ around
your text since they mark the beginning and the end of the string. Also,
\b has no size _but_ it does represent something: the boundary between a
word character (\w) and a non-word character (\W). - is not a word
character, thus \b-- won't match unless you have something like: A--STRING
Regards,
Alex
matteo a écrit :
> Hi,
> I have the string
>
> --STRING
>
> If I try to match whith QRegExp("--\\s*STRING") it runs, but if I try
> with QRegExp("\\b(--\\s*STRING)\\b") it doesn't match.
>
> Where is my mistake?
>
> Thanks
> Teo
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
>
--
Alexandre BERAUD
Ingénieur Développement
Infflux - Informatique & Flux
Tel: 01 49 57 92 00 - Fax : 01 49 57 92 01
Mail: aberaud at infflux.com
Visitez notre site : www.infflux.com
More information about the Qt-interest-old
mailing list