[Linux-disciples] Negated character class versus non-greedy match

Adam Kessel adam at rosi-kessel.org
Sat Mar 6 14:55:34 EST 2004


Makes intuitive sense to me, although I'm not sure why. You would think
the best way to do a non-greedy match in many cases would be to convert
it to a negated character class internally.

You could always just write two scripts doing it each way and benchmark
over a very large input data file.

On Sat, Mar 06, 2004 at 09:17:06AM -0500, Stephen R Laniel wrote:
>  From the Blosxom mailing list I'm on:
> 
> /*
> One of my perl-friends (works for ActiveState, the Perl guys)
> suggested that the negated character class was safer/faster
> than the non-greedy match (an early version of the plugin
> used that exact pattern). I haven't proved him wrong (or
> right) yet ... and can change it if you'd like.  It's one of
> those things I've been meaning to look up (or test) but
> haven't had the time.
> */
> 
> Does anyone know whether this is true?
> 
-- 
Adam Kessel
http://adam.rosi-kessel.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20040306/73c9840c/attachment-0001.pgp


More information about the Linux-disciples mailing list