perl -le '$t="John is following jane"; $t=~s/(jane)/##$1##/i; print $t +' John is following ##jane## $perl -le '$t="John is following Jane"; $t=~s/(jane)/##$1##/i; print $ +t' John is following ##Jane##
In reply to Re: Regex: Case insensitive search but case sensitive replace
by delirium
in thread Regex: Case insensitive search but case sensitive replace
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |