On Fri, 13 Aug 2004 01:41:10 +0900, Martin DeMello wrote
> Kirk Haines <khaines / enigo.com> wrote:
> 
> > The only idea that I have come up with is to put the literal matches in 
a 
> > hash, and then have the regular expressions in an array.  If there isn't 
a 
> > literal match, then one has to accept the time consuming process of 
> > iterating through each regexp and checking it.  Can anyone think of any 
> > other approaches that might be faster?
> 
> If you only need to know that there is a match, rather than what
> matched, how about combining all the regexps into one big regexp using
> ((re1)|(re2)|...)?

Hmmm.  Interesting idea.  I'll have to give it a try and see if there is a 
performance difference when doing that.


Thanks,

Kirk Haines