![]() |
|
Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Regex: Case insensitive search but case sensitive replaceby Abigail-II (Bishop) |
on Nov 17, 2003 at 12:26 UTC ( #307638=note: print w/replies, xml ) | Need Help?? |
Well, replacing 'Jane' (any case) with '##Jane##' (same case)
is trivial: s/(jane)/##$1##/ig; will do.
But let's say you want to replace 'Jane' (any case) with 'Mary' (same case). Here's one way of doing it:
Abigail
In Section
Seekers of Perl Wisdom
|
|