#!/usr/bin/perl # http://perlmonks.org/?node_id=1194583 use strict; use warnings; while() { s/ \b (?![A-Z]{2,}\b) (\w+) \b /\L$1/gx; print; } __DATA__ I am a GIRL A test WITH Multiple conDITions AND other tests.