A1: http://mydomain.com/images/prod01/9006.JPG
A2: http://mydomain.com/images/prod02/9006.JPG
A3: http://mydomain.com/images/prod03/9006.JPG
A4: http://mydomain.com/images/prod03/9007.JPG

I have a CSV import file that has a column for images. I need to identify identical file names even though the url paths are different. They will all go to a root dir on my server, so I need an excel formulas that will find identical files names in the different cells.

What I'd like is a formula in Column B, that lists the identical files like this.
B1: 9006.JPG
B2: 9006.JPG
B3: 9006.JPG
B4: empty cell ""