Remove part of the name with variable

A swapping-ground for Regular Expression syntax

Remove part of the name with variable

Postby Daniel79 » Thu Dec 13, 2018 8:15 pm

Hi
I'm new with the software so i'm lost a little bit with the RegEx syntax. So i need to remove some part of the name of my files.


EX1: F2 Sheet60-1-Layout1.pdf Result reach: F2-1.pdf (Sheetxxx must be remove regardeless the numberafter but keep hyphen with the digits after)
EX2: X1 Sheet 104-Layout1.pdf Result reach: X1.pdf (Sheetxxx must be remove regardeless the numberafter but must not keep the hyphen with the digit after)

all of this in the some CMD

best regards
Daniel79
 
Posts: 1
Joined: Thu Dec 13, 2018 7:52 pm

Re: Remove part of the name with variable

Postby bru » Fri Jan 04, 2019 6:47 pm

#1RegexMatch:
([^ ]*) Sheet[ \d]+(-\d)*

#1RegexReplace:
\1\2

#5RemoveWords:
\2

#12Filters:
*-*.pdf
bru
 
Posts: 62
Joined: Wed Jan 31, 2018 7:35 pm


Return to Regular Expressions