in reply to Matching Problem
As soon as it gets to a \W, it stops "putting things in $1".
Exactly what output are you looking for? Are you trying to extract everything before the date? Everything before the filename?