in reply to split and capitalize regex
This seems to work.
$s = 'the_quick_brown_fox_jumps_over_the_lazy_dog'; $s =~ s[(.)([^_]*?)(?:_|$)][\U$1\E$2 ]g; print $s; The Quick Brown Fox Jumps Over The Lazy Dog $s = 'fred'; $s =~ s[(.)([^_]*?)(?:_|$)][\U$1\E$2 ]g; print $s; Fred
|
|---|