This one looks for the position and substitutes with a 20. Hope this helps.
my $date = '02/04/03'; $date =~ s#(?<=/)(?=\d{2}$)#20#; print "$date\n";
In reply to Re: exercise in regex
by perlguy
in thread exercise in regex
by hiddengeek
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |