I have got something like this
sample.jpg photos/sample1.jpg photos/2006/sample2.jpg photos/2007//sample3.jpg
and I want to get this in a