# Replace error: Mezzosopran

**URL:** https://community.mp3tag.de/t/replace-error-mezzosopran/65534
**Category:** Support
**Created:** [August 9, 2024, 12:18pm UTC](https://community.mp3tag.de/t/replace-error-mezzosopran/65534 "2024-08-09T12:18:18Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![MusikBaum](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/85f322/32.png) [@MusikBaum](https://community.mp3tag.de/u/MusikBaum)
#### Post date: [August 9, 2024, 12:18pm UTC](https://community.mp3tag.de/t/replace-error-mezzosopran/65534/1 "2024-08-09T12:18:18Z")

</div>

I have errors with the replace function. Can someone help me?

Source: Soprano,Soprano Vocals,Soprano Voice,Sopran Vocals,Mezzosoprano Vocals,Mezzosopran,Mezzosoprano,Mezzo-Soprano

Goal IS: Stimme - Sopran,Stimme - Stimme - Mezzosopran,Mezzo-Stimme - Sopran

Goal SHOULD: Stimme - Sopran,Stimme - Mezzosopran

Stings:  
$replace(%ALLE\_INSTRUMENTE\_MULTI\_2%,Soprano Vocals,Stimme - Sopran,Sopran Vocals,Stimme - Sopran,Soprano Voice,Stimme - Sopran,Soprano,Stimme - Sopran)

$replace(%ALLE\_INSTRUMENTE\_MULTI\_2%,Mezzosoprano Vocals,Stimme - Mezzosopran,Mezzo-Soprano,Stimme - Mezzosopran,Mezzosoprano,Stimme - Mezzosopran,Mezzosopran,Stimme - Mezzosopran)

Thanks

---

<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 9, 2024, 12:35pm UTC](https://community.mp3tag.de/t/replace-error-mezzosopran/65534/2 "2024-08-09T12:35:33Z")

</div>

I think you replace the string "Mezzosopran" twice.

> [@MusikBaum](#):
>
> $replace(%ALLE\_INSTRUMENTE\_MULTI\_2%,Mezzosoprano Vocals,Stimme - Mezzosopran,Mezzo-Soprano,Stimme - Mezzosopran,Mezzosoprano,Stimme - Mezzosopran,Mezzosopran,Stimme - Mezzosopran)

First you replace  
Mezzosopran **o** with `Stimme - Mezzosopran`  
and later you replace  
Mezzosopran with `Stimme - Mezzosopran`

The word "Mezzosporan" in `Stimme - Mezzosopran` will be replaced & changed again (a second time) to  
`Stimme - Stimme - Mezzosopran`

You need to change the order of search-words which you want to replace in a way that they will only be replaced once.

---

<div class="post-metadata">

### Author: ![MusikBaum](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/85f322/32.png) [@MusikBaum](https://community.mp3tag.de/u/MusikBaum)
#### Post date: [August 9, 2024, 1:09pm UTC](https://community.mp3tag.de/t/replace-error-mezzosopran/65534/3 "2024-08-09T13:09:53Z")

</div>

Thank you. but the second has "o" at the end.

---

<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 9, 2024, 1:16pm UTC](https://community.mp3tag.de/t/replace-error-mezzosopran/65534/4 "2024-08-09T13:16:55Z")

</div>

> [@MusikBaum](#):
>
> but the second has "o" at the end.

I'm not sure if I understand what you mean.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [August 9, 2024, 1:19pm UTC](https://community.mp3tag.de/t/replace-error-mezzosopran/65534/5 "2024-08-09T13:19:37Z")

</div>

These are the pairs in your statement - here top to bottom, reflecting the course of action left to right:

```auto
Mezzosoprano Vocals,Stimme - Mezzosopran,
Mezzo-Soprano,Stimme - Mezzosopran,
Mezzosoprano,Stimme - Mezzosopran,
Mezzosopran,Stimme - Mezzosopran

```

After you have replaced Mezzosoprano with Stimme - Mezzosopran you replace a single Mezzosopran (which is now the part of the previous replacement) with another Stimme - Mezzosopran, leading to Stimme - Stimme - Mezzosopran

The replace command does not stop after the first hit but goes through the whole list.

---

<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 8, 2024, 1:19pm UTC](https://community.mp3tag.de/t/replace-error-mezzosopran/65534/6 "2024-09-08T13:19:55Z")

</div>

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