# How to replace certain signs but leave them when there are in brackets?

**URL:** <https://community.mp3tag.de/t/how-to-replace-certain-signs-but-leave-them-when-there-are-in-brackets/57485>\
**Category:** Support\
**Created:** [June 1, 2022, 1:42pm UTC](https://community.mp3tag.de/t/how-to-replace-certain-signs-but-leave-them-when-there-are-in-brackets/57485 "2022-06-01T13:42:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)\
**Post date:** [June 1, 2022, 1:42pm UTC](https://community.mp3tag.de/t/how-to-replace-certain-signs-but-leave-them-when-there-are-in-brackets/57485/1 "2022-06-01T13:42:28Z")

</div>

I need to replace signs `: `, `-` and `, ` with sign `; ` in all of my `TITLE`s

But the problem is that some of the `TITLE`s have parts of it content put inside brackets and on top of that sometimes that content in brackets has the `-` sign among it that needs to stay there. In other words, `[` marks the start while `]` marks the end of the areas where a Replace action should not be applied at all. And to make things even more complicated, if `-` happens to be outside of a bracket area but serves as a hyphen [i.e. without pauses before and after it] it needs to stay as `-` [i.e. still without pauses] and not turn into `;`. And any other special signs have to be ignored and cannot interfere with the process  
` `  
` `  
So for example:

> Symphony #3 (Symphony Of Sorrowful Songs), Opus #36, Movement #1: Lento - Sostenuto Tranquillo Ma Cantabile ^1 [BM1]

has to become

> Symphony #3 (Symphony Of Sorrowful Songs); Opus #36; Movement #1; Lento; Sostenuto Tranquillo Ma Cantabile ^1 [BM1]

` `  
` `

> Symphony #3 (Symphony Of Sorrowful-Songs), Opus #36, Movement #2: Lento - Tranquillissimo ^1 [M1]

has to become

> Symphony #3 (Symphony Of Sorrowful-Songs); Opus #36; Movement #2; Lento; Tranquillissimo ^1 [M1]

` `  
` `

> Symphony #3 (Symphony Of Sorrowful--Songs), Opus #36, Movement #3: Lento - Cantabile-Semplice ^2 {Mix-Original} [M1-2E]

has to become

> Symphony #3 (Symphony Of Sorrowful--Songs); Opus #36; Movement #3; Lento; Cantabile-Semplice ^2 {Mix-Original} [M1-2E]

` `  
` `  
So how would such complicated action look like?

---

<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:** [June 1, 2022, 1:53pm UTC](https://community.mp3tag.de/t/how-to-replace-certain-signs-but-leave-them-when-there-are-in-brackets/57485/2 "2022-06-01T13:53:49Z")

</div>

It should be fairly easy to replace ), with ); - that's a simple replace of string constants.  
Also it should be easy to replace the ; with " - " after you have replaced the ones following a brackt.

Why do you have sometimes 2 hyphens for the same separation?

> [@Zerow](#):
>
> Sorrowful--Songs

vs.

> [@Zerow](#):
>
> Sorrowful-Songs

So I would suggest that you filter for each occurance of a string or string pattern first and check if you really got the ons that you want and then apply a suitable action with a similar pattern.

I do not trust these copied/constructed examples. So it would either be better to se and actual example or for you to test the search expression with the filter function.

---

<div class="post-metadata">

**Author:** ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)\
**Post date:** [June 1, 2022, 2:12pm UTC](https://community.mp3tag.de/t/how-to-replace-certain-signs-but-leave-them-when-there-are-in-brackets/57485/3 "2022-06-01T14:12:58Z")

</div>

> [@ohrenkino](#):
>
> It should be fairly easy to replace ),  
> [...]  
> Why do you have sometimes 2 hyphens for the same separation?  
> [...]  
> I do not trust these copied/constructed examples  
> [...]

There are copy-pasted but modeled after real occurrences. It's just than I would have to past in something like at least dozens of real and completely different `TITLE`s which would be hard to read and figure out what the rules of my naming system are. I simply took the approach of coming up with every possible variations - and squeezing them into just 3 life-like examples. I also took into considerations _false-positives_ or whatever they should be called [hence e.g. the `--` issue]

But even if what I am after is possible - after executing it I will manually compare new and old `TITLE`s, just to be sure I did not mess something up by forgetting about special cases or by not foreseeing possible overlapping of rules [or whatever they should be called]

---

<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:** [June 1, 2022, 2:15pm UTC](https://community.mp3tag.de/t/how-to-replace-certain-signs-but-leave-them-when-there-are-in-brackets/57485/4 "2022-06-01T14:15:35Z")

</div>

And?  
Did you try the first 2 suggestions?  
Then, are further variations left?

---

<div class="post-metadata">

**Author:** ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)\
**Post date:** [June 3, 2022, 5:33pm UTC](https://community.mp3tag.de/t/how-to-replace-certain-signs-but-leave-them-when-there-are-in-brackets/57485/5 "2022-06-03T17:33:54Z")

</div>

I will in a near future as I plan to do this change to all my files after I ready them for burning a backup of them on Blu-ray

I will report back then

---

<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:** [February 9, 2026, 12:29pm UTC](https://community.mp3tag.de/t/how-to-replace-certain-signs-but-leave-them-when-there-are-in-brackets/57485/6 "2026-02-09T12:29:47Z")

</div>


