Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Thanks for looking!use stric; use warnings; my @files = qw( XY201308.TXT TW201308.TXT KG201308.TXT MM201308.TXT ); foreach my $file (@files) { # triyng to lower case the to letters and replace the digits with yy $file=~s/(\w{2})(\d+)/$1\lc($1),$2\lc(yy)/e; print "\n $file \n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: RegEx match in files
by choroba (Cardinal) on Aug 07, 2013 at 13:37 UTC | |
|
Re: RegEx match in files
by rjt (Curate) on Aug 07, 2013 at 13:44 UTC | |
|
Re: RegEx match in files
by Laurent_R (Canon) on Aug 07, 2013 at 17:34 UTC |