# How to put text between Parentheses in Parentheses ") text (" to ") (text) ("

**URL:** <https://community.mp3tag.de/t/how-to-put-text-between-parentheses-in-parentheses-text-to-text/47778>\
**Category:** Support\
**Created:** [February 4, 2020, 10:48pm UTC](https://community.mp3tag.de/t/how-to-put-text-between-parentheses-in-parentheses-text-to-text/47778 "2020-02-04T22:48:02Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![SpirosG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/spirosg/32/8589_2.png) [@SpirosG](https://community.mp3tag.de/u/SpirosG)\
**Post date:** [February 4, 2020, 10:48pm UTC](https://community.mp3tag.de/t/how-to-put-text-between-parentheses-in-parentheses-text-to-text/47778/1 "2020-02-04T22:48:02Z")

</div>

Hi,

I would like to create an action to reform the %title% tag

for example if title is

Mayores (Deville Club Mix) No Rap (Clean)

to

Mayores (Deville Club Mix) (No Rap) (Clean)

---

<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:** [February 5, 2020, 5:47am UTC](https://community.mp3tag.de/t/how-to-put-text-between-parentheses-in-parentheses-text-to-text/47778/2 "2020-02-05T05:47:28Z")

</div>

You can try an action of the type "Replace with regular expression" for TITLE  
Search string: `(.*\)) (.*) (\(.*)'`  
Replace string: `$1 '('$2')' $3`

---

<div class="post-metadata">

**Author:** ![SpirosG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/spirosg/32/8589_2.png) [@SpirosG](https://community.mp3tag.de/u/SpirosG)\
**Post date:** [February 5, 2020, 8:44pm UTC](https://community.mp3tag.de/t/how-to-put-text-between-parentheses-in-parentheses-text-to-text/47778/3 "2020-02-05T20:44:35Z")

</div>

HI @ohrenkino,  
Thanks for the help, it seems that the correct one is

"Replace with regular expression" for TITLE  
Search string: `(.*\)) (.*) (\(.*)`  
Replace string: `$1 ($2) $3`

👍 😉

By the way is there any way to create a filter to identify files like the example above?

---

<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:** [February 5, 2020, 9:04pm UTC](https://community.mp3tag.de/t/how-to-put-text-between-parentheses-in-parentheses-text-to-text/47778/4 "2020-02-05T21:04:52Z")

</div>

> [@SpirosG](#):
>
> a filter to identify files like the example above

Use the filter keyword MATCHES  
title MATCHES `".*\) .* \(.*"`

---

<div class="post-metadata">

**Author:** ![SpirosG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/spirosg/32/8589_2.png) [@SpirosG](https://community.mp3tag.de/u/SpirosG)\
**Post date:** [February 5, 2020, 9:12pm UTC](https://community.mp3tag.de/t/how-to-put-text-between-parentheses-in-parentheses-text-to-text/47778/5 "2020-02-05T21:12:14Z")

</div>

> [@ohrenkino](#):
>
> Use the filter keyword MATCHES  
> title MATCHES `".*\) .* \(.*"`

This filter also returns the tracks in this format `Mayores (Deville Club Mix) (No Rap) (Clean)`

---

<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:** [February 6, 2020, 5:48am UTC](https://community.mp3tag.de/t/how-to-put-text-between-parentheses-in-parentheses-text-to-text/47778/6 "2020-02-06T05:48:33Z")

</div>

Try  
`title MATCHES "\) .+ \("`

---

<div class="post-metadata">

**Author:** ![SpirosG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/spirosg/32/8589_2.png) [@SpirosG](https://community.mp3tag.de/u/SpirosG)\
**Post date:** [February 6, 2020, 9:23am UTC](https://community.mp3tag.de/t/how-to-put-text-between-parentheses-in-parentheses-text-to-text/47778/7 "2020-02-06T09:23:26Z")

</div>

> [@ohrenkino](#):
>
> `title MATCHES "\) .+ \("`

It returns the same results again... 🤔

---

<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:** [February 6, 2020, 9:32am UTC](https://community.mp3tag.de/t/how-to-put-text-between-parentheses-in-parentheses-text-to-text/47778/8 "2020-02-06T09:32:14Z")

</div>

I just tested  
`title MATCHES "\) .+ \("`  
and it returned

My Left Foot (Mein Linker Fuss) "Un' Aura Amorosa" (From "Cosi Fan Tutte")  
Ewok Celebration (Film Version) / End Credits (Film Version)  
Leia Breaks The News (Alternate) / Funeral Pyre For A Jedi (Film Version)

Which is the pattern "closing bracket - text - opening brackets" ...

---

<div class="post-metadata">

**Author:** ![SpirosG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/spirosg/32/8589_2.png) [@SpirosG](https://community.mp3tag.de/u/SpirosG)\
**Post date:** [February 6, 2020, 9:56am UTC](https://community.mp3tag.de/t/how-to-put-text-between-parentheses-in-parentheses-text-to-text/47778/9 "2020-02-06T09:56:59Z")

</div>

> [@ohrenkino](#):
>
> Which is the pattern "closing bracket - text - opening brackets"

It does returm patterns like `"closing bracket - text - opening brackets"`

But to me at least it also returns patterns like `"closing bracket - (text) - opening brackets"` 🤔

---

<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:** [February 6, 2020, 10:00am UTC](https://community.mp3tag.de/t/how-to-put-text-between-parentheses-in-parentheses-text-to-text/47778/10 "2020-02-06T10:00:35Z")

</div>

then add to the already entered filter:  
AND NOT HAS ") ("

---

<div class="post-metadata">

**Author:** ![SpirosG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/spirosg/32/8589_2.png) [@SpirosG](https://community.mp3tag.de/u/SpirosG)\
**Post date:** [February 6, 2020, 10:12am UTC](https://community.mp3tag.de/t/how-to-put-text-between-parentheses-in-parentheses-text-to-text/47778/11 "2020-02-06T10:12:27Z")

</div>

This filter is working in some cases `%title% MATCHES "\) .+ \(" AND NOT %Title% HAS ") ("`

But this Filter excludes files like these ones

`California Love (Deville Epic West Coast Intro) Slam Edit (Full Song) (Clean)`

`California Love (Deville Epic West Coast Intro) (Slam Edit) 2Pac Only (Clean)`

---

<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:** [February 6, 2020, 10:18am UTC](https://community.mp3tag.de/t/how-to-put-text-between-parentheses-in-parentheses-text-to-text/47778/12 "2020-02-06T10:18:43Z")

</div>

That is the problem with patterns: a different pattern requires a different filter, usually there is not a universal one for all cases.

Something like  
`"\).*\) .+ \("`  
or  
`"\) .+ \(.*\("`  
may filter for some of the above new patterns.

---

<div class="post-metadata">

**Author:** ![SpirosG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/spirosg/32/8589_2.png) [@SpirosG](https://community.mp3tag.de/u/SpirosG)\
**Post date:** [February 6, 2020, 10:36am UTC](https://community.mp3tag.de/t/how-to-put-text-between-parentheses-in-parentheses-text-to-text/47778/13 "2020-02-06T10:36:39Z")

</div>

> [@ohrenkino](#):
>
> That is the problem with patterns: a different pattern requires a different filter, usually there is not a universal one for all cases.

I see, this is a tough one, thanks for your time by the way!

These ones are working like the first filters (it keeps on returning tracks with and without parentheses)

`"\).*\) .+ \("`  
or  
`"\) .+ \(.*\("`

But when i add the `AND NOT %Title% HAS ") ("` it's not returning any file although there are some not formatted in the way i want them to. Probably this is a normal behaviour because these files do have `) (`

---

<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:** [February 6, 2020, 10:51am UTC](https://community.mp3tag.de/t/how-to-put-text-between-parentheses-in-parentheses-text-to-text/47778/14 "2020-02-06T10:51:13Z")

</div>

I do not have such files in my collection - I tend to use unique separators for each type of data - one for mixes (I use []) one for featured artists (I use `<&..>`) or other information ({} is nice) - and the ordinary round brackets only for those texts that are actually part of the real title.  
Like that it is easier to distinguish which information is present and which isn't.  
Also, I have an order: the mix-information is always in front of the featured artist, if both pieces of information are present.  
Like that you get unique patterns.

---

<div class="post-metadata">

**Author:** ![SpirosG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/spirosg/32/8589_2.png) [@SpirosG](https://community.mp3tag.de/u/SpirosG)\
**Post date:** [February 7, 2020, 6:27pm UTC](https://community.mp3tag.de/t/how-to-put-text-between-parentheses-in-parentheses-text-to-text/47778/15 "2020-02-07T18:27:48Z")

</div>

This makes sense (using different separators for each type of data) but unfortunately most of my tracks are from DJ Pools or Beatport/Traxsource and all these services are mostly (if not only) use just round brackets and i already have a a huge collection formatted in that way, it would be a nightmare to re-tag all of them again. Except that, most of these services are using a different way to order the informations of the tracks but I try to have an order also (Mix/Remix) (Additional infos if there are) (Clean/Explicit).

Once again thanks for all the help you are offering. 👏 👏 👏

---

<div class="post-metadata">

**Author:** ![SpirosG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/spirosg/32/8589_2.png) [@SpirosG](https://community.mp3tag.de/u/SpirosG)\
**Post date:** [February 7, 2020, 7:38pm UTC](https://community.mp3tag.de/t/how-to-put-text-between-parentheses-in-parentheses-text-to-text/47778/16 "2020-02-07T19:38:23Z")

</div>

Sorry @ohrenkino one more question...

What script should i create for this

`Jerry Sprunger - Lemi Vice & Action Jackson Remix (Dirty)`

to

`Jerry Sprunger (Lemi Vice & Action Jackson Remix) (Dirty)`

---

<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:** [February 7, 2020, 7:48pm UTC](https://community.mp3tag.de/t/how-to-put-text-between-parentheses-in-parentheses-text-to-text/47778/17 "2020-02-07T19:48:33Z")

</div>

I would create 2 actions of the type "Replace"  
first:  
Search: `_(`  
Replace: `)_(`  
second:  
Search: `_-_`  
Replace: `_(`  
(please note that there are a number blanks and I replaced them with an underscore so that they are visible here in the forum - please use the space character instead of the underscore in the code)  
or one of the type "Format value"  
Format string: `$replace(%title%,' (',') ( ',- ,'(')`

---

<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:** [March 8, 2020, 7:48pm UTC](https://community.mp3tag.de/t/how-to-put-text-between-parentheses-in-parentheses-text-to-text/47778/18 "2020-03-08T19:48:34Z")

</div>

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