[Qt-interest] QRegExp for document analysing
Thiago Macieira
thiago at kde.org
Mon Dec 6 14:11:20 CET 2010
Em Segunda-feira, 6 de Dezembro de 2010, às 13:59:03, Omar AKHAM escreveu:
> Okay, thank you...So how can I know when to use a regex and when to use
> a normal parser ?
That's easy:
normal parser = always
regexp = never
:-)
For approximate values of "never" and "always" (give or take 5%). A Regular
Expression will never beat a hand-tuned parser in terms of performance. It
might be easier to write, though, so it's a point for readability (if the
regex itself is readable).
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101206/584a7f99/attachment.bin
More information about the Qt-interest-old
mailing list