Help for this page
http://www.domain.com/data/2005/sales/01012005.txt http://www.domain.com/data/2005/sales-jan/01232005.txt ... http://www.domain.com/data/2005/sales-outside-jan/01012005.txt ... ...
$dir = $1 if /\/(\w+(|-\w+|-\w+-\w+))\/\w+\.txt$/;