# Help with removing certain characters from a string of a user-defined tool

**URL:** https://community.mp3tag.de/t/help-with-removing-certain-characters-from-a-string-of-a-user-defined-tool/69527
**Category:** Support
**Created:** [August 24, 2025, 10:09pm UTC](https://community.mp3tag.de/t/help-with-removing-certain-characters-from-a-string-of-a-user-defined-tool/69527 "2025-08-24T22:09:15Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![chero97](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/278dde/32.png) [@chero97](https://community.mp3tag.de/u/chero97)
#### Post date: [August 24, 2025, 10:09pm UTC](https://community.mp3tag.de/t/help-with-removing-certain-characters-from-a-string-of-a-user-defined-tool/69527/1 "2025-08-24T22:09:15Z")

</div>

I’m using this string [https://rateyourmusic.com/song/$replace($lower(%artist%)/$lower(%title%)](https://rateyourmusic.com/song/$replace($lower(%25artist%25)/$lower(%25title%25)), ,-) to check RYM for data on specific songs, but since special characters (‘, &,…) invalidate the search I’m looking for a way to automatically remove them from the link.

For example if I search for a song instead of giving me this [https://rateyourmusic.com/song/sly-&-the-family-stone/que-sera,-sera-(whatever-will-be,-will-be)/](https://rateyourmusic.com/song/sly-&-the-family-stone/que-sera,-sera-(whatever-will-be,-will-be)/)

i want it to give me this [https://rateyourmusic.com/song/sly-and-the-family-stone/que-sera-sera-whatever-will-be-will-be/](https://rateyourmusic.com/song/sly-and-the-family-stone/que-sera-sera-whatever-will-be-will-be/)

If anyone has an idea of how to achieve this, the help would be greatly appreciated

---

<div class="post-metadata">

### Author: ![rboss](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/5f9b8f/32.png) [@rboss](https://community.mp3tag.de/u/rboss)
#### Post date: [August 25, 2025, 1:42am UTC](https://community.mp3tag.de/t/help-with-removing-certain-characters-from-a-string-of-a-user-defined-tool/69527/2 "2025-08-25T01:42:05Z")

</div>

From the [documentation](https://docs.mp3tag.de/scripting/):

`$replace(x,y,z)`

- returns the string x with all occurrences of string y replaced by string z. Supports multiple parameter pairs y and z.

The "multiple pairs" part means that this function actually behaves more like `$replace(x,y1,z1,y2,z2,...,yN,zN)`, and can be used to replace several characters\strings in one go.

You can remove your undesired characters (‘, &,…) with  
`$replace(%string%,',,&,,...,[unwanted character A],[blank],[unwanted character B],[blank])`

Hope this helps.

---

<div class="post-metadata">

### Author: ![chero97](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/278dde/32.png) [@chero97](https://community.mp3tag.de/u/chero97)
#### Post date: [August 25, 2025, 10:25am UTC](https://community.mp3tag.de/t/help-with-removing-certain-characters-from-a-string-of-a-user-defined-tool/69527/3 "2025-08-25T10:25:27Z")

</div>

It does help, but I’m running into the issue that if I try to replace any special character’s with nothing it deletes everything that follows.

To stick to the same example using this [https://rateyourmusic.com/song/$replace($lower(%artist%)/$lower(%title%)](https://rateyourmusic.com/song/$replace($lower(%25artist%25)/$lower(%25title%25)), ,-,&,and,',', ,'(', ,')', )

will give me this [https://rateyourmusic.com/song/sly-and-the-family-stone/que-sera/](https://rateyourmusic.com/song/sly-and-the-family-stone/que-sera/)

Do you have an idea on what might be the issue

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [August 25, 2025, 10:40am UTC](https://community.mp3tag.de/t/help-with-removing-certain-characters-from-a-string-of-a-user-defined-tool/69527/4 "2025-08-25T10:40:58Z")

</div>

Are you sure @chero97?

Could you please show us exactly what you currently use as `ARTIST` and `TITLE` content?

If I try it with:  
TITLE: `Que Sera Sera (Whatever Will Be, Will Be) (alternate mix)`  
ARTIST: `Sly & the Family Stone`  
and your  
`$replace($lower(%artist%)/$lower(%title%), ,-,&,and,',', ,'(', ,')', )`  
I see this preview result:

 ![](https://community.mp3tag.de/uploads/default/original/3X/4/b/4b2869b41cb7d6e3c5c6c3d18b0c4c9a41c0b970.png)

---

<div class="post-metadata">

### Author: ![chero97](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/278dde/32.png) [@chero97](https://community.mp3tag.de/u/chero97)
#### Post date: [August 25, 2025, 10:57am UTC](https://community.mp3tag.de/t/help-with-removing-certain-characters-from-a-string-of-a-user-defined-tool/69527/5 "2025-08-25T10:57:56Z")

</div>

%artist% is Sly & The Family Stone

%title% is Que Sera, Sera (Whatever Will Be, Will Be)

---

<div class="post-metadata">

### Author: ![chero97](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/278dde/32.png) [@chero97](https://community.mp3tag.de/u/chero97)
#### Post date: [August 25, 2025, 11:02am UTC](https://community.mp3tag.de/t/help-with-removing-certain-characters-from-a-string-of-a-user-defined-tool/69527/6 "2025-08-25T11:02:03Z")

</div>

> [@LyricsLover](#):
>
> $replace($lower(%artist%)/$lower(%title%), ,-,&,and,',', ,'(', ,')', )

figured it out `$replace($lower(%artist%)/$lower(%title%), ,-,&,and,',',,'(',,')',)`

Thanks for the help

Still doesn’t seem to work for apostrophe’s though

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [August 25, 2025, 11:09am UTC](https://community.mp3tag.de/t/help-with-removing-certain-characters-from-a-string-of-a-user-defined-tool/69527/7 "2025-08-25T11:09:24Z")

</div>

> [@chero97](#):
>
> Still doesn’t seem to work for apostrophe’s though

Example for `ARTIST` or `TITLE` with apostrophes that doesn't work?

---

<div class="post-metadata">

### Author: ![chero97](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/278dde/32.png) [@chero97](https://community.mp3tag.de/u/chero97)
#### Post date: [August 25, 2025, 11:12am UTC](https://community.mp3tag.de/t/help-with-removing-certain-characters-from-a-string-of-a-user-defined-tool/69527/8 "2025-08-25T11:12:43Z")

</div>

Figured it out, needed to look like this in the string `$replace($lower(%artist%)/$lower(%title%), ,-,&,and,',',,'(',,')',,`‘‘,,)

For anyone interested in the final string

`https://rateyourmusic.com/song/$replace($lower(%artist%)/$lower(%title%), ,-,&,and,'(',,')',,',',,'',,'-(feat.', ,à,a,à,a,ä,a,ã,a,å,a,â,a,ć,c,č,c,ċ,c,ç,c,ĉ,c,ð,d,ē,e,ě,e,ĕ,e,é,e,ê,e,ė,e,è,e,ë,e,ę,e,ī,i,ǐ,i,ĭ,i,í,i,î,i,ĩ,i,ì,i,ï,i,ñ,n,ń,n,ņ,n,ň,n,ṅ,n,ō,o,ǒ,o,ó,o,ô,o,ò,o,ö,o,ŏ,o,ø,o,õ,o,ŕ,r,ř,r,ū,u,ǔ,u,ŭ,u,ú,u,û,u,ũ,u,ù,u,ü,u,ý,y)`

---

<div class="post-metadata">

### Author: ![chero97](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/278dde/32.png) [@chero97](https://community.mp3tag.de/u/chero97)
#### Post date: [August 25, 2025, 12:07pm UTC](https://community.mp3tag.de/t/help-with-removing-certain-characters-from-a-string-of-a-user-defined-tool/69527/9 "2025-08-25T12:07:53Z")

</div>

Adjusted it after some testing against my music library

`https://rateyourmusic.com/song/$replace($lower(%artist%)/$lower(%title%), ,-,&,and,'-(feat.', ,.,,+-,,'(',,')',,',',,'',,!,,à,a,ä,a,å,a,â,a,ç,c,ð,d,é,e,ê,e,ė,e,è,e,ë,e,í,i,ì,i,ï,i,ñ,n,ó,o,ò,o,ö,o,ø,o,ü,u,ú,u,ù,u)`

feat. removal needs to go before the () removal as to not interfere with eachother and the function seems to have a maximum amount of variables it’s able to remove so I removed some of the rare letters

Also there are some idiosyncracies in how rym links are constructed in which this will still not produce results. Namely if there are abbreviations separated by dots in the title or artist because those would need to be replaced by underscores, while any other instance of a dot in an artist name or song title needs to be removed for the link to work

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [September 24, 2025, 12:08pm UTC](https://community.mp3tag.de/t/help-with-removing-certain-characters-from-a-string-of-a-user-defined-tool/69527/10 "2025-09-24T12:08:27Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
