Given the following file/directory structure:
/photos/1/original/filename1.jpg
/photos/1/thumb/filename1.jpg
/photos/2/original/filename2.jpg
/photos/2/thumb/filename2.jpg
/photos/3/original/filename3.jpg
/photos/3/thumb/filename3.jpg
...etc. I'm looking for the regexp to convert the file/directory structure to:
/photos/1/original.jpg
/photos/1/thumb.jpg
/photos/2/original.jpg
/photos/2/thumb.jpg
/photos/3/original.jpg
/photos/3/thumb.jpg
...etc. I've got scripts to do the file renaming in ruby or perl...just missing the proper regexp.
Thanks for any help in advance!