in reply to Case-sensitive substitution with case-insensitive matches

s/(word)/anotherword^substr($1^lc$1,0,1)/egi
  • Comment on Re: Case-sensitive substitution with case-insensitive matches