Re: Dynamic regular expressions

2001-05-22 Thread Aaron Craig
Try this: my $stringToMatch = "hello"; my $runtimeRegExp = "he"; print $stringToMatch." world" if($stringToMatch =~ /$runtimeRegExp/gi); At 09:23 22.05.2001 -0400, you wrote: >Hi people, > > I need to match string against regular expressions that are only >known at run-time. I'm having

Re: Dynamic regular expressions

2001-05-22 Thread Carl Rogers
Good day; See below for what I think may be the issues...Haven't tried it out before, but hope this helps. At 09:23 AM 5/22/2001 -0400, Robin Lavallee (LMC) wrote: >Hi people, > > I need to match string against regular expressions that are only >known at run-time. I'm having problems do

Re: Dynamic regular expressions

2001-05-22 Thread Timothy Kimball
Robin Lavallee wrote: : On the command lines, the following happend : : allo al => match : allo /al/ => no match (should match, no ?) No, because "allo" doesn't contain any slashes. : allo lo$ => match : allo ^al => match : allo ^ao$

RE: Dynamic regular expressions

2001-05-22 Thread Kris Cook
Just wanted to point out that the pair: allo ^ao$ doesn't work, because this regex matches "ao" on a line by itself. you would have to perform two matches, one for "^a" and another for "o$" in order to match te string "allo" this way. As for why the '/' doesn't cooperate, it has to do with the