We do evaluation on right side of the substitution. With '#' in there it didn't work (might need more figuring out).$a="John is following jane"; $a=~s/(jane)/ucfirst(lc($1));/iee; print "$a\n";
In reply to Re: Regex: Case insensitive search but case sensitive replace
by Hena
in thread Regex: Case insensitive search but case sensitive replace
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |