Insert multiple time the same character

Bulk Rename Utility How-To's

Insert multiple time the same character

Postby marzy » Wed Aug 09, 2023 2:33 pm

Hello I need to insert the same charachter (a dot) in several fixed positions in the file name, I tried with regular expression but I've not been able to do it:
example
original file name:
D90ITH4125104012_R00 - some title text here.PDF

desider file name:
D.90.IT.H.41251.040.12._R.00 - some title text here.PDF

thanks!
marzy
 
Posts: 1
Joined: Wed Aug 09, 2023 2:29 pm

Re: Insert multiple time the same character

Postby therube » Wed Aug 09, 2023 3:53 pm

If it's always in that same format

> 1-char, 2-char, 2-char, 1-char, 5-char, 3-char, 2-char ...

then you can simply use that.


1:RegExe
Code: Select all
Match:  ^(.)(..)(..)(.)(.....)(...)(..)_R(.*)
Replace:  \1.\2.\3.\4.\5.\6.\7._R.\8


Code: Select all
D90ITH4125104012_R00 - some title text here.PDF
->   D.90.IT.H.41251.040.12._R.00 - some title text here.PDF
therube
 
Posts: 1319
Joined: Mon Jan 18, 2016 6:23 pm


Return to How-To