Tom Phoenix wrote:
> On 3/10/06, Jay Savage <[EMAIL PROTECTED]> wrote:
> 
>>Are the two shorter matches more efficient than a single one
>>for some reason?
> 
> Probably; smaller, simpler patterns give the regular expression engine
> more room for optimizations. The order of the two patterns may also
> make a difference, but anything could be fastest, depending upon the
> data. The only way to know for sure is benchmarking.

Thanks Tom.  For a complete discussion of regular expression optimisations
read this book: http://www.oreilly.com/catalog/regex2/  :-)


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to