Page 1 of 1

Multi-rename regex replace

Posted: 30.09.2020, 13:43
by JPL75
Hello,

I am trying to use multirename regex capability.

I am able to create a regex for the "search for:" field, but I am not able to reuse the "match" in the "search for:" to build the "replace with: expression.

What I want to do ? I have files which end with "(" digit1 ")" and files which end with "(" digit1 digit2 ")". I want to rename the ones with one digit into "(" 0 digit1 ")".

I am able to select the files with 1 digit, but cannot reuse this digit into the replace field.

Help will be appreciated.
Jean-Pierre

Re: Multi-rename regex replace

Posted: 28.11.2020, 10:58
by JPL75
I finally discovered through another forum post that $ followed by a digit, can be used in "replace with" to reuse the matched expression.
I did not find this in the documentation.

See screenshot
https://1drv.ms/u/s!AjfndlER36u2hdkxZEB ... A?e=TIcLPL

Re: Multi-rename regex replace

Posted: 28.11.2020, 11:01
by JPL75
Solution to my previous post :
Search for : (\()(\d\))
Replace with : (0$2
Tick "regular expression"

Re: Multi-rename regex replace

Posted: 05.06.2021, 09:49
by dvb
Solution to my previous post :
Search for : (\()(\d\))
Replace with : (0$2
Tick "regular expression"
Thanks for this. I needed to reformat the date from [exift_DateTimeOriginal] for some .MOV files and chop of the hh-mm-ss portion, but the \x style backreferences weren't working. Your post got me on the right track. 👍

Re: Multi-rename regex replace

Posted: 14.11.2021, 16:54
by vodoomoth
Thanks from me too!