On Jul 29, Ton Hospel said: >In article <Pine.GSO.4.21.0107282304050.28213-100000@crusoe.crusoe.net>, > Jeff 'japhy/Marillion' Pinyan <jeffp@crusoe.net> writes: >> This leads me to my optimization proposal: unless (??{ ... }) interferes, >> any regex with a $ or \Z or \z end-of-string anchor should be able to fail >> immediately upon inspection of the end of the string. > >don't forget that the m modifier also interferes for $ I'm well aware of that. And that doesn't lend itself to much optimization, since you have to tunnel through the string first to find the newlines. We already know where the end of the string is. Maybe it'll be ok. -- Jeff "japhy" Pinyan japhy@pobox.com http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look for "Regular Expressions in Perl" published by Manning, in 2002 **Thread Previous