#!/usr/bin/perl $a = '2003 % 05 % 1720:55:23'; $a=~ s/[0-9]{2}\:[0-9]{2}\:[0-9]{2}$//; $a=~ s/\s+\%\s+/-/g; print $a,"\n";
Output:
2003-05-17
In reply to Re: Regex to parse a date
by TVSET
in thread Regex to parse a date
by MD
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |