Skip to content

Perl: Regular Expressions Examples

Use the following substitution:

s/(\w*)/\u\L\1/g;

\w* represents a word.

\L means lowercase the whole word.

\u means uppercase the first letter of the word.