Removing date in filename

A swapping-ground for Regular Expression syntax

Removing date in filename

Postby MDLefevere » Thu Aug 11, 2016 9:49 am

Goodmorning,

I'm quite new here so sorry if this is a stupid question.
I'm trying to get rid of datestamps inside a filename.

For example:
vikings.15.02.16.episode.2

The part that must be removed is:
.15.02.16.

Maybe replaced with a - so the filename would become
vikings - episode.2


Thanks and greetings

Maurice
MDLefevere
 
Posts: 2
Joined: Thu Aug 11, 2016 9:45 am

Re: Removing date in filename

Postby therube » Thu Aug 11, 2016 11:41 am

(Not tested well, but...)

1:RegEx
Code: Select all
Match:  (.*)\.\d\d\.\d\d\.\d\d\.(.*)
Replace:  \1 - \2
therube
 
Posts: 392
Joined: Mon Jan 18, 2016 6:23 pm

Re: Removing date in filename

Postby MDLefevere » Thu Aug 11, 2016 11:48 am

therube wrote:(Not tested well, but...)

1:RegEx
Code: Select all
Match:  (.*)\.\d\d\.\d\d\.\d\d\.(.*)
Replace:  \1 - \2



Nice. Thanks. Works like a charm! :D
MDLefevere
 
Posts: 2
Joined: Thu Aug 11, 2016 9:45 am


Return to Regular Expressions