sequential renumbering

A swapping-ground for Regular Expression syntax

sequential renumbering

Postby WayneCa » Mon Aug 24, 2020 5:27 pm

I have read other posts on this topic, but none were exactly what I need to know. I have a series of bmp image files that have names like: wl6_pic_0115.bmp

These files are all in sequential order, and there are no missing numbers in the filenames. All of them are 4-digit numbers beginning with 0. I need to renumber them beginning at 0018 and ending at 0145, incrementing each one by 1, so 18 -> 19 through 145 -> 146. How can I do this with a regular expression?
Posts: 1
Joined: Mon Aug 24, 2020 5:14 pm

Re: sequential renumbering

Postby Admin » Tue Aug 25, 2020 1:45 am

Hi, sort them by current order, remove last 4 characters from name and add a padded counter starting from 0018, incr by 1.
Site Admin
Posts: 2059
Joined: Tue Mar 08, 2005 8:39 pm

Return to Regular Expressions