S_Shrum has asked for the wisdom of the Perl Monks concerning the following question:
I want to provide a upper and lower case replace capability to my program. The line that does the standard regex works but I am not sure if the LC and UC calls will work. I have not been able to check this but figured I'd post in case there is a different way to tackle this.
Here is what I am doing (%input is CGI)
for ( keys %input ) { $report =~ s/$input->param('wrapper')$_$input->param('wrapper')/$i +nput->param($_)/g; $report =~ s/$input->param('wrapper')lc_$_$input->param('wrapper') +/lc $input->param($_)/g; $report =~ s/$input->param('wrapper')uc_$_$input->param('wrapper') +/uc $input->param($_)/g; }
It's lines 3 and 4 I am curious about. Will that work? From the looks of it, I would assume not (meaning it won't do what I'm thinking I want it to do).
TIA
Sean Shrum
sean@shrum.net
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: REGEX question
by japhy (Canon) on Feb 06, 2002 at 02:36 UTC | |
by S_Shrum (Pilgrim) on Feb 06, 2002 at 05:49 UTC | |
by S_Shrum (Pilgrim) on Feb 14, 2002 at 12:03 UTC | |
by S_Shrum (Pilgrim) on Feb 14, 2002 at 10:48 UTC | |
by japhy (Canon) on Feb 14, 2002 at 14:49 UTC | |
|
Re: REGEX question
by jonjacobmoon (Pilgrim) on Feb 06, 2002 at 02:43 UTC | |
by S_Shrum (Pilgrim) on Feb 06, 2002 at 05:58 UTC |