in reply to Regex: Case insensitive search but case sensitive replace
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##
|
|---|