#1 2022-10-09 16:20

loungebob
Member
Registered: 2015-09-29
Posts: 45

+ sign (plus sign) in rename operation

I know I still got another thing open on here and I'll get to that later.

but I was wondering, probably obvious to everyone but me, is the plus sign (+) being treated as a special character when doing replace operations? whenever I have a file name containing a plus sign, the rename operation does not work.

eg. BLABLA.2015.2160p.UHD.BluRay.REMUX.HDR10+.HEVC.DoVi.DTS-X.7.1-BLA I need to replace HDR10+ to HDR10PLUS, then do all the other replacement operations and then revert it to HDR10+ in the finalized name.

can I escape or whatever the + in the original filename so I can do all replacement operations including wildcards (if I do the temp 10+ to 10Plus conversion in the same rule I cant do wildcards because of the *|* I assume) in a single rule?

Offline

#2 2022-10-09 20:29

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: + sign (plus sign) in rename operation

You could add another two rules:


One before your rules to replace all + with e.g. #

Next your rules.

And at the end add a replace rule to change all # to +




Instead of a # you could also replace all + with the string PLUS, or something like that.


 


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

#3 2022-10-10 03:26

loungebob
Member
Registered: 2015-09-29
Posts: 45

Re: + sign (plus sign) in rename operation

ok. I get the idea. it’s more or less how I do it now. just thought for the sake of reducing the hundreds of rules I could squeeze this into one :-)

cant use hashtag though, too many occurrences in show and movie titles. but I get the gist, use something rare/unique to temporarily replace the +.

so I was right, the + is not treated like any other normal character?

Offline

#4 2022-10-10 03:28

loungebob
Member
Registered: 2015-09-29
Posts: 45

Re: + sign (plus sign) in rename operation

hmm no upvotes or likes. so, thanks stefan!

Offline

#5 2022-10-11 00:02

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: + sign (plus sign) in rename operation

loungebob wrote:

is the plus sign (+) being treated as a special character when doing replace operations? whenever I have a file name containing a plus sign, the rename operation does not work.

eg. BLABLA.2015.2160p.UHD.BluRay.REMUX.HDR10+.HEVC.DoVi.DTS-X.7.1-BLA I need to replace HDR10+ to HDR10PLUS, then do all the other replacement operations and then revert it to HDR10+ in the finalized name.

No, the plus sign "+" is not a special character as far as the standard Replace rule goes.

Can you demonstrate your issue?

Replacing "HDR10+" with "HDR10PLUS" works just fine:

mini_renamer-loungebob-plus-sign-replace.png

Offline

#6 2022-10-11 03:25

loungebob
Member
Registered: 2015-09-29
Posts: 45

Re: + sign (plus sign) in rename operation

using replace on
2160p.UHD.BluRay.REMUX.HDR10+.HEVC.DoVi.*-TEST
2160p.UHD.BluRay.REMUX.DV.10bit.HDR10.$1.HEVC-TEST
does not work

using it on
2160p.UHD.BluRay.REMUX.HDR10PLUS.HEVC.DoVi.*-TEST
2160p.UHD.BluRay.REMUX.DV.10bit.HDR10.$1.HEVC-TEST
does work.

only diff, the +/PLUS

I cannot however change to HDR10+ in the working example, then the replace function wont work again.

Offline

#7 2022-10-14 10:48

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: + sign (plus sign) in rename operation

If you enable the wildcards option, then the "+" sign does become a meta character. In that case, it is getting interpreted as repetition of the immediately preceding character, same as in Regular Expressions.

There is no way to escape it in the rule configuration. It needs to be escaped internally, so it is always interpreted literally.

This behaviour has been changed in v7.4.0.1 Beta. Try the latest development version.

Offline

#8 2022-10-17 23:42

loungebob
Member
Registered: 2015-09-29
Posts: 45

Re: + sign (plus sign) in rename operation

I'll check it out, thanks!

Offline

Board footer

Powered by FluxBB