You are not logged in.
Pages: 1
I'm hoping someone can help me, basically I want to create a rule that will take a filename like this:
[aTag] aFilename - 01.mkv
and remove the [aTag] portion regardless of what it actually contains (e.g. [superaweseomesub] or [iLikeMilk] )
leaving: aFilename - 01.mkv
I think my problem is to do with making renamer see the [square brackets] as non-wildcard characters, because: *] does not work.
Any ideas?
Offline
Hi and welcome.
FROM:
[aTag] aFilename - 01.mkvremove the [aTag]
TO:
aFilename - 01.mkv
Please try if this will help you:
Rule CleanUp: Strip out contents of brackets [..] , Fix spaces (skip extension)
See our wiki for more: http://www.den4b.com/wiki/ReNamer:Rules:CleanUp
Read the *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline
Great Don't know how I missed that.
I guess though in some circumstances I would only want to strip the first set of brackets in a filename.
So orginally,
[firstTag] fileNameHere [2ndTag] [3rdTag]. extension
but I want
fileNameHere [2ndTag] [3rdTag]. extension
I'd appreciate it if anyone knows a simple method of achieving this although I can live with it as it is.
Offline
FROM:
[firstTag] fileNameHere [2ndTag] [3rdTag].extTO:
fileNameHere [2ndTag] [3rdTag].ext
I have know that would be come next
It would be nice if we had the option to ably each rule at the first occurrence only (or at n'th occ, for that matter)
For an few rules we have the option to ably at "All", "First" and "Last", but often we need an freeform "n'th occ",
and then this feature should be available on all rules where that makes sense.
In the meantime we can use an PascalScript or an RegEx rule to solve this.
For your issue try RegEx:
1) RegEx: Replace expression "^\[.+?] (.+)" with "$1" (skip extension)
Exp: "^\[.+?] (.+)"
Rep: "$1"
Explanation:
"..." ==> don't use the quotes, they are for clarification only
^===> match at start of string
\[ ===> match literal "["
.+? ==> match one-or-more of any sign, non-greedy (remove the '?' to see the effect)
] ===> match literal "]"
(.+) ==> match one-or-more of any sign, store in group "$1"
Then replace with what is matched with the second regex (.+) and stored in group $1
Read the *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline
Pages: 1