[Interest] QRegExp help: boundaries
Giuseppe D'Angelo
giuseppe.dangelo at kdab.com
Wed Mar 27 23:57:34 CET 2013
Il 27/03/2013 11:57, Sensei ha scritto:
> I assume that "nothing" isn't a valid boundary here.
>
> Am I right?
No, you're just falling into a very common error when using \b.
\b matches the 0-length transition between a \w character and a \W, and
the beginning and the end of the string are counted as a \W.
But there's no such transition in your string: the \b is between the
beginning (\W) and the leading backslash (\W again). Therefore, it will
not match.
HTH,
--
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Software Engineer
KDAB (UK) Ltd., a KDAB Group company
Tel. UK +44-1738-450410, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions
More information about the Interest
mailing list