insert multiple characters between numbers

Post any Bulk Rename Utility support requirements here. Open to all registered users.

insert multiple characters between numbers

Postby gmatheus » Thu May 19, 2022 2:09 pm

Hello.

I named files with lots of dates written, for example:

T-085634-D030

Is there a way for me to use this program to automatically scan the entire directory and change them to, using RegEx :

T-08-56-34-D030

Thanks.
gmatheus
 
Posts: 1
Joined: Thu May 19, 2022 1:37 pm

Insert two hyphens inbetween a 6-digit number

Postby Luuk » Fri May 20, 2022 5:25 am

For the example, RegEx(1) can use a "Match" and "Replace" like...
^(T-)(\d\d)(\d\d)(\d\d)(-D\d+)$
\1\2-\3-\4\5


To conduct all 6-digit numbers inbetween hyphens, can put a checkmark inside "v2" with a "Match" and "Replace" like...
(?<=-)(\d\d)(\d\d)(\d\d)(?=-)/g
$1-$2-$3


To conduct all 6-digit numbers (even inside of words) can put a checkmark inside "v2" with a "Match" and "Replace" like...
(?<!\d)(\d\d)(\d\d)(\d\d)(?!\d)/g
$1-$2-$3
Luuk
 
Posts: 690
Joined: Fri Feb 21, 2020 10:58 pm


Return to BRU Support