http://www.perlmonks.org?node_id=649424


in reply to Re: regex for text manipulation
in thread regex for text manipulation

hi,

The third match is the dot, then why the need of lc($3), i think $3 is enough.

$str =~ s/^(\w)(.*?)([.])(\w)(.*)/uc($1).lc($2).($3).uc($4).lc($5)/gei;