Great Circle Associates Majordomo-Users
(June 1994)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: setting default regexp_array in 1.90
From: Stephen P Potter <spp @ cis . ufl . edu>
Organization: Department of Impossible Probably Facts
Date: Wed, 08 Jun 1994 17:57:45 EDT
To: "Mark Frost" <mfrost @ ncd . com>
Cc: majordomo-users @ greatcircle . com
In-reply-to: Some random ramblings on Wed, 08 Jun 1994 14:11:33 -0700.
Reply-to: Stephen P Potter <spp @ cis . ufl . edu>

Strange sunspot activity caused "Mark Frost" <mfrost@ncd.com> to write:
| > /regexp1|regexp2/;  # you might want to escape the periods (\.)
| 
| Actually, I did try this.  I thought I recalled reading somewhere in
| the perl book that putting "|" inside of a regular expression is rather
| inefficient.  (Although for the life of me I can't seem to find this
| mentioned in the perl book when I look for it now...)

Page 35 of the Camel book says this:
"(However, we don't recommend that you combine patterns unnecessarily -- it
may be more concise, but it's generally less readable and may run more
slowly.)"

I've never noticed it to be a problem, and definitely think it would be
quicker than creating an array and cycling through the array, which is what
the original suggestion seemed (to me at least) to be proposing.

Steve

Indexed By Date Previous: Re: setting default regexp_array in 1.90
From: "Mark Frost" <mfrost@ncd.com>
Next: digest
From: davep@jersey.sps.mot.com (Dave Penaskovic)
Indexed By Thread Previous: Re: setting default regexp_array in 1.90
From: "Mark Frost" <mfrost@ncd.com>
Next: Custom responses to requests
From: bill@biome.bio.ns.ca (Bill Silvert)

Google
 
Search Internet Search www.greatcircle.com