Hi Guys,
I need some help please with padding numbers using a regular expression. I often have files that could be named as follows:
IMG1.JPG
IMG10.JPG
IMG100.JPG
IMG1000.JPG
Due to the way the sorting occurs I need to have the files padded to the length of the highest number, in this example 4 digits. So
IMG1 would become IMG0001.JPG
IMG10 would become IMG0010.JPG
IMG100 would become IMG0100.JPG
IMG1000 would remain as IMG1000.JPG
I can achieve this using the numbering function but need to do it in several passes, I would ideally like to achieve this in one pass and assume a regexp is the answer.
Thank you in anticipation.