Parse date from filename
Date: 01/03/08
(PHP Community) Keywords: no keywords
I need help with creating a RegEx to parse a date from the filename.
$filename = 'Foobar2007-09-12.pdf'
preg_match('?(19|20)[0-9]{2}[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])/i', $filename, $matches);
Source: http://community.livejournal.com/php/608488.html