Wild card usage

Bulk Rename Utility How-To's

Wild card usage

Postby RobertArens37 » Wed Jan 06, 2021 10:27 pm

I have 1000s of .jpg files names like this that I need to change. I need to change the date format from, for example, "1725sep9JohnEvans.........." to, for example, "17250909JohnEvans......." without the quotes.
RobertArens37
 
Posts: 1
Joined: Wed Jan 06, 2021 10:14 pm

Re: Wild card usage

Postby Luuk » Thu Jan 07, 2021 3:52 pm

Greetings Robert. Im thinking the javascript conducts like your explanation much easier, but not expert knowing it. The RegEx(1) also can do this, but its much longer commands, so please to save it somewhere after the editing. The settings is all inside of RegEx(1) with a checkmark in "v2", then all of this!

Match...
Code: Select all
(\d)(jan|feb|mar|apr|mai|jun|jul|aug|sep|okt|nov|dec)([1-9][^\d])(?X)(\d)jan(\d)(?X)(\d)feb(\d)(?X)(\d)mar(\d)(?X)(\d)apr(\d)(?X)(\d)mai(\d)(?X)(\d)jun(\d)(?X)(\d)jul(\d)(?X)(\d)aug(\d)(?X)(\d)sep(\d)(?X)(\d)okt(\d)(?X)(\d)nov(\d)(?X)(\d)dec(\d)

Replace...
Code: Select all
$1${2}0$3(?X)${1}01$2(?X)${1}02$2(?X)${1}03$2(?X)${1}04$2(?X)${1}05$2(?X)${1}06$2(?X)${1}07$2(?X)${1}08$2(?X)${1}09$2(?X)${1}10$2(?X)${1}11$2(?X)${1}12$2

First, to edit the month names in "Match" if your spelling can be different, then Im thinking it conducts very well. Im glad you ask this question, because it teaches me about ${#} to separate "too may numbers" after "$" in the replace. This was difficult to understand, lucky Im also using the exiftool and its the similiar methods.
Luuk
 
Posts: 705
Joined: Fri Feb 21, 2020 10:58 pm


Return to How-To