you'll want to consider something like
m!^/(.*?)/! [download]
In reply to Re: regex on path by aufrank in thread regex on path by Sara