in reply to Regular expressions extract, change num to word and capitalize each word after AU: tag and add 'written by'
my @months = qw /january february march april may june july etc/; $x = 'january february march april may june july etc'; $x =~ s/\b\Q$months[$_]\E\b/sprintf '%02d',1+$_/e for 0 .. @months-1; print "$x\n";
|
|---|