Page 1 of 1

insert multiple characters between numbers

PostPosted: Thu May 19, 2022 2:09 pm
by gmatheus
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.

Insert two hyphens inbetween a 6-digit number

PostPosted: Fri May 20, 2022 5:25 am
by Luuk
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