RE: multiple regex in if() staetment

2003-08-25 Thread Dan Muey
> On Tue, Aug 19, 2003 at 05:54:42PM -0500, Dan Muey wrote: > > Howdy all: > > > > I'm trying to figure out the best way to test a string > agains a list > > of regexs like so: > > > > my @regex = qw(qr(joe$) qr(^mama) qr([abc])); > > As was pointed out already, don't use the qw(). > > Here

Re: multiple regex in if() staetment

2003-08-21 Thread David Storrs
On Tue, Aug 19, 2003 at 05:54:42PM -0500, Dan Muey wrote: > Howdy all: > > I'm trying to figure out the best way to test a string agains a list of regexs like > so: > > my @regex = qw(qr(joe$) qr(^mama) qr([abc])); As was pointed out already, don't use the qw(). Here are some interesting bench

RE: multiple regex in if() staetment

2003-08-20 Thread Dan Muey
Thanks for the pointers! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: multiple regex in if() staetment

2003-08-20 Thread James Edward Gray II
On Tuesday, August 19, 2003, at 05:54 PM, Dan Muey wrote: I'm trying to figure out the best way to test a string agains a list of regexs like so: my @regex = qw(qr(joe$) qr(^mama) qr([abc])); I see you already got your grep() answer, but... There's definitely no reason to use that qw() operato

Re: multiple regex in if() staetment

2003-08-19 Thread James Edward Gray II
On Tuesday, August 19, 2003, at 05:54 PM, Dan Muey wrote: I'm trying to figure out the best way to test a string agains a list of regexs like so: my @regex = qw(qr(joe$) qr(^mama) qr([abc])); I see you already got your grep() answer, but... There's definitely no reason to use that qw() operato

Re: multiple regex in if() staetment

2003-08-19 Thread Wiggins d'Anconia
Dan Muey wrote: Howdy all: I'm trying to figure out the best way to test a string agains a list of regexs like so: my @regex = qw(qr(joe$) qr(^mama) qr([abc])); if($string does not match any of the regexs in @regex) { } So basically if($string !~ [EMAIL PROTECTED]) { ... }

multiple regex in if() staetment

2003-08-19 Thread Dan Muey
Howdy all: I'm trying to figure out the best way to test a string agains a list of regexs like so: my @regex = qw(qr(joe$) qr(^mama) qr([abc])); if($string does not match any of the regexs in @regex) { } So basically if($string !~ [EMAIL PROTECTED]) { ... } I suppose I cou