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

**URL:** https://community.mp3tag.de/t/strrstr-x-y-last-occurrence-of-string-x-in-string-y/66646
**Category:** Mac
**Created:** [November 27, 2024, 3:46pm UTC](https://community.mp3tag.de/t/strrstr-x-y-last-occurrence-of-string-x-in-string-y/66646 "2024-11-27T15:46:39Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![mista\_j](https://community.mp3tag.de/user_avatar/community.mp3tag.de/mista_j/32/15808_2.png) [@mista\_j](https://community.mp3tag.de/u/mista_j)
#### Post date: [November 27, 2024, 4:18pm UTC](https://community.mp3tag.de/t/strrstr-x-y-last-occurrence-of-string-x-in-string-y/66646/3 "2024-11-27T16:18:12Z")

</div>

> [@Scripting Functions](https://community.mp3tag.de/t/scripting-functions/51689/1):
>
> `$strrstr(x,y)` finds the last 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))`

---

_[View the full topic](https://community.mp3tag.de/t/strrstr-x-y-last-occurrence-of-string-x-in-string-y/66646)._
