Looking for specific regular expression (first eight)

A swapping-ground for Regular Expression syntax

Looking for specific regular expression (first eight)

Postby alexanderrl97 » Tue Nov 10, 2020 4:28 pm

Hello people,

i hope that somebody can help me there. I need support finding the right regular expression for my case.

The files I need to rename have the following names:

20181019 Mustermann GmbH - Angebot XYZ.pdf

I need to replace the "-" with the first eigth characters containing the date so the file name will be:

Mustermann GmbH 20181019 Angebot XYZ.pdf

The length of all files are different, which is why i cant use the move/copy parts function of Bulk Rename Utility. I wanted to use the "RegEx" Funktion, but dont know the right regular expression for "first eight characters"

RegEx (1)
Match: -
Replace: ????

Does anybody here know how i can do it?
alexanderrl97
 
Posts: 1
Joined: Tue Nov 10, 2020 4:19 pm

Re: Looking for specific regular expression (first eight)

Postby therube » Tue Nov 10, 2020 5:43 pm

(I don't have access to current version, currently, so...)

Is it always, date name name (-) ... ?

In 1:RegEx, select "simple" (or maybe it's that other option ?) & see what something like this does:

Code: Select all
Match:  %1 %2 %3 - %4
Replace:  %2 %3 %1 %4
therube
 
Posts: 1022
Joined: Mon Jan 18, 2016 6:23 pm


Return to Regular Expressions