delete characters before a certain letter

Advanced Renamer forum
#1 : 17/02-25 19:58
Daniel
Posts: 4
hello,

I currently have a series of 10 chapters, which has names as follows

Dan Brown's The Lost Symbol - S01E01 - As Above, So Below (x264, hdr, AND SOME OTHER CRAP)

what i need is to know what parameters i have to set in the app to make each chapter look like this

S01E01 - As Above, So Below
S01E02 - The Araf
etc.

I ask this because each chapter has a different name and different lengths, so it becomes a bit tricky to achieve it.

I remain attentive to anything, thanks in advance.
#2 : 17/02-25 21:21
Delta Foxtrot
Posts: 431
Reply to #1:

Hi Daniel,

It's unclear from your post whether you want to keep ONLY that part of the original filename, but from the title I'm going to assume that's what you want.

Either way, though, always look at the boundary characters around the parts you want to transform; in this case you have " - " after the series name, another after the season/episode, and a parenthesis after the episode title. So those are all you need to key on.

EDIT: With one "New name" method:
New name: <substr:'- ':' ('>
(creates a "substring" that finds the first "- " and takes everything after that up to but not including " (".

END EDIT

With one replace method:
Replace: ^(.*) - (.*) - (.*) \((.*)
With: $2 - $3
Case: doesn't matter
Regular expressions: CHECKED
Apply to: Name

That's it, as long as you don't have " - " in the series names or " (" in the episode names.

In the "Replace: " part you've created four boxes (the "(.*)" parts) that hold the information parts of your file, separated by the delimiters you specified. The "\(" in regex is just a parenthesis-open; since regex recognized "(" as part of a command you have to tell regex that it's just another character to look for, by putting "\" before it. The "$2" and "$3" in the "Replace with: " part are the second and third boxes, the parts you want to keep, divided by the delimiter you want.

By extension, if you wanted to put the series title in parenthesis after the episode name you'd just add "($1)" at the end of the "Replace with: ".

Best,
DF

edited: 17/02-25 21:50
#3 : 17/02-25 21:40
Delta Foxtrot
Posts: 431
Reply to #2:

Daniel,

I realized that, since you are only removing information from the file, you could do it with 2 "Remove pattern" methods instead (no regex, case doesn't matter):

Remove: * -
(no space before asterisk; space after dash)
This carves off everything up to and including the first " - ".

Remove: (*
(space before paren-open, no space after asterisk)
Carves out the " (" and everything after.

Just for choice's sake. :)

Cheers!
DF

edited: 17/02-25 21:43
#4 : 18/02-25 00:43
Daniel
Posts: 4
Reply to #3:

you are the man!, it worked, thanks a lot