That one won't promote single-digit numbers to double-digit numbers.
s/(\d?\d)(-\d?\d)-(\d?\d)/(2000+$1).sprintf("%02g", $2).sprintf("%02g" +,$3)/eg
could do it, but that's similarly untested :-)
In reply to Re^2: need regular expression
by Corion
in thread need regular expression
by jesuashok
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |