Name removal and formatting question

A swapping-ground for Regular Expression syntax

Name removal and formatting question

Postby Malebolgia » Wed Mar 23, 2016 2:07 pm

I have read through the forum but cannot seem to get the behavior I am looking for out of the regular expression capability. I am looking to simplify the name convention of various files I import such that the following inputs:

the.title.goes.here.S01E01.word[s].[720p,1080p].word[s].mkv
the title goes here S01E01 word[s] [720p,1080p] word[s].mkv

results in the standard naming convention of:

The Title Goes Here.s01e01.[720p,1080p].mkv

For the above example the braces indicate an "OR" situation when describing the input file names but would always prefer spaces between the capitalized words in the title followed by the use of lower case in the season and episode abbreviations as well as the removal of all other words apart from the resolution which should be retained in the renaming.

So far I have been using the following with manually selecting the 720p or 1080p portion

Search:
(.*)[s,S](\d+)[e,E](\d+)
Replace:
\1s\2e\3.720p
or
\1s\2e\3.1080p

but each one often requires a bit of tweaking which would be nice to automate if possible. I have been trying various trial and error approaches but I am not understanding something basic as i thought the following should work but does not do at all what I expect.

Search:
(.*)[s,S](\d+)[e,E](\d+)(.*)[720p,1080p](.*)
Replace:
\1s\2e\3\4
Malebolgia
 
Posts: 2
Joined: Wed Mar 23, 2016 12:10 pm

Re: Name removal and formatting question

Postby Malebolgia » Tue Mar 29, 2016 7:12 pm

I feel a bit better in that the answer wasn't obvious to everyone else but I could use a few clues or suggestions that I can try out and see if I can stumble upon a solution eventually.
Malebolgia
 
Posts: 2
Joined: Wed Mar 23, 2016 12:10 pm

removal of first 3 spaces in name

Postby georgewest » Sun Sep 11, 2016 1:39 am

My music folder contains songs that have a "track" number in the first 3 characters - thus they must be removed before my list will compile in an "Alpha" sort. How do I just remove these 3 prefix numbers in a BULK formatting?
georgewest
 
Posts: 1
Joined: Sun Sep 11, 2016 1:20 am


Return to Regular Expressions