Rodster001 has asked for the wisdom of the Perl Monks concerning the following question:
I looked over perlretut and searched here, but didn't see an answer to this.
This regexp works:
But what I want to do is this:$ENV{REQUEST_URI} =~ s#/Products/bt-(.*?).aspx#/s/Products/$1#i;
How do I make that work? Am I missing a modifier?my $in = "/Products/bt-(.*?).aspx"; my $out = "/s/Products/$1"; $ENV{REQUEST_URI} =~ s#$in#$out#i;
Thanks for your help! (and sorry if an answer to this was in those links above, but I missed it).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using Regexp Patterns as Variables
by kyle (Abbot) on Mar 18, 2009 at 16:11 UTC | |
by ikegami (Patriarch) on Mar 18, 2009 at 16:39 UTC | |
by Rodster001 (Pilgrim) on Mar 18, 2009 at 16:51 UTC | |
by Anonymous Monk on Mar 18, 2009 at 17:49 UTC | |
by kyle (Abbot) on Mar 18, 2009 at 16:48 UTC | |
by ikegami (Patriarch) on Mar 18, 2009 at 16:56 UTC | |
by Rodster001 (Pilgrim) on Mar 18, 2009 at 17:06 UTC | |
by Rodster001 (Pilgrim) on Mar 18, 2009 at 16:23 UTC | |
by Rodster001 (Pilgrim) on Mar 18, 2009 at 17:01 UTC | |
by kyle (Abbot) on Mar 18, 2009 at 17:08 UTC | |
by Rodster001 (Pilgrim) on Mar 18, 2009 at 17:26 UTC | |
by kyle (Abbot) on Mar 18, 2009 at 18:09 UTC | |
| |
|
Re: Using Regexp Patterns as Variables
by kennethk (Abbot) on Mar 18, 2009 at 16:10 UTC |