in reply to Re^2: Working with filesin thread Working with files
If you change the middle quantifier from non-greedy to greedy, it will try to match the longest possible part.