in reply to REGEX question
japhy learned something today -- \Q, \L, and \U nest with their respective \E as shown above.my $w = $input->param('wrapper'); for (keys %input) { $report =~ s/\Q$w$_$w/$input->param($_)/eg; $report =~ s/\Q$w\L$_\E$w/$input->param(lc)/eg; $report =~ s/\Q$w\U$_\E$w/$input->param(uc)/eg; }
_____________________________________________________
Jeff[japhy]Pinyan:
Perl,
regex,
and perl
hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: REGEX question
by S_Shrum (Pilgrim) on Feb 06, 2002 at 05:49 UTC | |
by S_Shrum (Pilgrim) on Feb 14, 2002 at 12:03 UTC | |
|
Re: Re: REGEX question
by S_Shrum (Pilgrim) on Feb 14, 2002 at 10:48 UTC | |
by japhy (Canon) on Feb 14, 2002 at 14:49 UTC |