removing everything after a

Advanced Renamer forum
#1 : 21/09-21 06:50
generic user
generic user
Posts: 1


21/09-21 06:50 - edited 18/01-22 00:55
#2 : 21/09-21 11:18
David Lee
David Lee
Posts: 1125
Use a Replace method with a regular expression...

Replace: .*_([^_]*)_[^_]*_[^_]*$
With: \1
Use regular expressions

eg for "ActorA_ActorB_ActorC_ExampleMovieTitle_4096x2160_24fps.mp4":

".*_" matches a string of as many characters as possible ending with "_" ie "ActorA_ActorB_ActorC_"
"([^-]*)" matches any string of any characters not including "_" and saves the result as \1 ie "ExampleMovieTitle"
"_[^_]*" matches "_" followed by a string of any characters except "-" ie "_4096x2160"
"_[^_]*&" as previous but must be at the end of the filename ie "_24fps"

See the User Guide for further explanation:
www.advancedrenamer.com/user_guide/regular_expresions


21/09-21 11:18 - edited 21/09-21 11:22