Filename regex extraction

BOOMER

New Member
I'd like to get parts of the filenamefilename\[code\]blabla_2009-001_name_surname-name_surname\[/code\]I'd like to get: 2009-001, name_surname, name_surnameI've come up with this, but it's no good\[code\]preg_match("/(?:[0-9-]{8})_(?:[a-z_]+)-(?:[a-z_]+)/", $filename, $matches);\[/code\]Any pointers?Thanks!BR
 
Back
Top