![]() |
|
good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
s/\b($old)\b/lc$new^$1^lc$1/gie
Update: In case $new=~/\W/ or length$new<length$old it may be slightly more complicated: s/\b($old)\b/lc$new^($1^lc$1)&(lc$new^uc$new)/gie In reply to Re: Case-preserving substitutions
by I0
|
|