[Qt-interest] Problem with qregexpr

Sean Harmer sean.harmer at maps-technology.com
Mon Oct 5 14:13:22 CEST 2009


On Monday 05 Oct 2009 12:39:05 matteo wrote:
> 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?
Just a guess, but have you tried:

QRegExp("^(--\\s*STRING)$")

? Does QRegExp itself report any errors from errorString()?

Sean



More information about the Qt-interest-old mailing list