$strrstr(x,y) Last Occurrence of String X in String Y

I found $strrstr(x,y) in some documentation but I'm not able to get it working on my end. I have a field now that is.

/01/_ [C]/01/_ Back Cover/01//01/_ [E]/01/_ Back Cover/01//01/_ [E]/01/_ Back Cover/01//01/_ [C]/01/_ Back Cover/01//01/_ [E]/01/_ Back Cover/01//01/_ [E]/01/_ Back Cover/01//01/_ [C]/01/_ Back Cover/01//01/_ [C]/01/_ Back Cover/01//01/_ [E]/01/_ Back Cover/01//01/_ [E]/01/_ Back Cover/01//01/_ [C]/01/_ Back Cover/01//01/_ [E]/01/_ Back Cover/01//01/_ [C]/01/_ Back Cover/01//01/_ [C]/01/_ Back Cover/01//02/_ [C]/02/_ Back Cover/02//02/_ [C]/02/_ Back Cover/02//02/_ [C]/02/_ Back Cover/02//03/_ [C]/03/_ Back Cover/03//03/_ [C]/03/_ Back Cover/03//03/_ [C]/03/_ Back Cover/03/

Its a mess but these are cover descriptions sandwiched by /$NUM(%DISCNUMBER%,2)/
What i'd like to do is use this field to create multiple other fields by grabbing subsections. Everything from disc 1 into field 1 everything from disc 2 into field 2... I will then remove the duplicates from those newly created fields & continue on with my action group.

I was going to use cut left & then cut right using the first & last occurrences but the formula for last occurrence has left me high & dry.

any suggestions?

For a bit of context to the madness I've exported all the cover descriptions for 1 album & id like to remove the duplicate descriptions & then confirm which tracks use embedded art that matches each cover description disc by disc. The bottom of this album description is a rough draft of my desired outcome

Here is a regular expression that grabs the last occurance of a set string and inserts some characters (==) .
And just to prove that it is the last, I added a ++ in front of that string.
In a second step you could use "Guess value" to split the field.
$regexp('/01/_ [C]/01/_ Back Cover/01//01/_ [E]/01/_ Back Cover/01//01/_ [E]/01/_ Back Cover/01//01/_ [C]/01/_ Back Cover/01//01/_ [E]/01/_ Back Cover/01//01/_ [E]/01/_ Back Cover/01//01/_ [C]/01/_ Back Cover/01//01/_ [C]/01/_ Back Cover/01//01/_ [E]/01/_ Back Cover/01//01/_ [E]/01/_ Back Cover/01//01/_ [C]/01/_ Back Cover/01//01/_ [E]/01/_ Back Cover/01//01/_ [C]/01/_ Back Cover/01//01/_ [C]/01/_ Back Cover/01//02/_ [C]/02/_ Back Cover/02//02/_ [C]/02/_ Back Cover/02//02/_ [C]/02/_ Back Cover/02//03/_ [C]/03/_ Back Cover/03//03/_ [C]/03/_ Back Cover/03//03/_ [C]/03/_ Back Cover/03/',(.*)(Back Cover/02)(.*),$1++$2==$3)

leads to
/01/_ [C]/01/_ Back Cover/01//01/_ [E]/01/_ Back Cover/01//01/_ [E]/01/_ Back Cover/01//01/_ [C]/01/_ Back Cover/01//01/_ [E]/01/_ Back Cover/01//01/_ [E]/01/_ Back Cover/01//01/_ [C]/01/_ Back Cover/01//01/_ [C]/01/_ Back Cover/01//01/_ [E]/01/_ Back Cover/01//01/_ [E]/01/_ Back Cover/01//01/_ [C]/01/_ Back Cover/01//01/_ [E]/01/_ Back Cover/01//01/_ [C]/01/_ Back Cover/01//01/_ [C]/01/_ Back Cover/01//02/_ [C]/02/_ Back Cover/02//02/_ [C]/02/_ Back Cover/02//02/_ [C]/02/_ ++Back Cover/02==//03/_ [C]/03/_ Back Cover/03//03/_ [C]/03/_ Back Cover/03//03/_ [C]/03/_ Back Cover/03/

And just by definition: I think it is a vain undertaking to force a function to do the opposite of what is documented:

Function Description
$strstr(x,y) finds the first occurrence of string y in string x.

$Regexp(%BINC%,(.*)(/02/)(.*),$1++$2==$3)
This works very well as an identifier, but how can I edit
it properly so that it only adds a "=" after the last occurrence, I can then use that equal sign as a reference point to cut the full string from the right. Since I can already cut from the left to remove leading info using
$Cutleft(%BINC%,$sub($strstr(%BINC%,'/02/'),1))

You can test format strings in Convert>Tag-Tag
Add apostrophes to escape special characters like /.

Are you sure that it says "last occurrence of string y in string x as the documentation that I see says
$strrchr(x,y) finds the last occurrence of character y in string x.
and there is no function $strrstr().

Honestly I thought it was odd too but it is listed here

It is sad that you do not not post in the Mac section as using the matching section would rule out a lot of misunderstandings.

So there are functions that work on mac but not on PC? That's a bit disheartening. When I search for scripting functions in mp3tag sometimes this is the list that appears & often times those functions work for me, as such I had assumed both versions of the app would be equal

I cannot do a lot about your assumptions.
It would still be a good approach to reveal as much information about the surrounding conditions so that the problem can be narrowed down as effectively as possible.
And that would include to post in the dedicated section.
So: is this a Mac problem?

I had assumed that all the functions listed here would still be available on PC. I do not have access to a mac so I cant say whether those work on that operating system. I just searched "last occurrence of string" & boom a possible solution, as i stated before it did not work for me but that would be my fault for assuming the versions of the app have the same scripting functions.

There is no mention of $strrstr(x,y) on the Windows support document.
image

Maybe an oversight in the document, or perhaps not currently supported in mp3tag for Windows?

This returned by MP3tag for Windows:
grafik
Or in short: that function does not exist in Windows version.

Is there any reason for this? Are we second rate citizens on Windows? is there some conflict with the windows operating system? @Florian

See also this thread:

which claims the opposite.
So the only conclusion is: there are differences.
And to rule out solutions that rely on one of the differences, it is very advisable to post in the correct forum section.

Yes, I was contacted by a user of the Mac version and they explained in a very friendly way, why this scripting function would be helpful for them. I've implemented it and released it in Oct 2022.

Until now, nobody was missing it for the Windows version.

A more general remark regarding

Comments like those instantly drain the joy from everything. You need to understand and accept, that the Windows and the Mac version are two separate implementations, and that one might have benefits over the other and vice versa.

If you're missing something, we have a place here for feature requests. Drop every entitlement you're holding. With the Windows version, you're using software currently free of cost to you.

I see my joke was not well delivered or well received. Until today it was my understanding that there was one application available on multiple platforms, as such I had assumed that MP3TAG was like many other apps. Beyond exclusive abilities & or limitations the same featureset is available on any version of the application. This is not to say I think both versions must include the same feature set. Put simply my assumption was far from the truth.
To me, whether we use a mac or PC our collective goal is the same. We want to tag & organize our libraries in whataver ways our imagination allows. Admittedly my visions are likely a bit smaller than many users as I've yet to grasp regex but nonetheless Im glad you've given us a place to do so. Like many others I love this app...
I spend more time in it than id be willing to admit & besides the frustrations I've brought on myself organizing is oddly therapeutic.

For what it's worth, I'd have great use for $strrstr(x,y) in the windows version, e.g. when chewing through imported text files to get info out of them.

Sometimes I have used

$sub($len(x),$add($strstr($reverse(x),$reverse(y)),$sub($len(y),2)))

as a workaround - that does the job but tends to clutter the strings, especially if they're long or complex.

I've just released Mp3tag v3.30 for Windows, which now also includes $strrstr(x,y), which finds the last occurrence of string y in string x