# Complex Filename to Tag - How to Keep Parentheses

**URL:** https://community.mp3tag.de/t/complex-filename-to-tag-how-to-keep-parentheses/63503
**Category:** Support
**Created:** [January 20, 2024, 10:53pm UTC](https://community.mp3tag.de/t/complex-filename-to-tag-how-to-keep-parentheses/63503 "2024-01-20T22:53:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![fcastro](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/b3f665/32.png) [@fcastro](https://community.mp3tag.de/u/fcastro)
#### Post date: [January 20, 2024, 10:53pm UTC](https://community.mp3tag.de/t/complex-filename-to-tag-how-to-keep-parentheses/63503/1 "2024-01-20T22:53:17Z")

</div>

Hi, I have a bunch of mp3 that I want to remove a space and number that is in the name. So remove ".130" in this case (putting a "." to show the blank space.

Camila Cabello - Shameless (Intro Edit) (Main) 130.mp3

So I am using the "filename - Tag" and have got as far as:

"%artist% - %title% (%title%) (%title%) %dummy%"

I want the keep the parentheses so final should be:

Camila Cabello - Shameless (Intro Edit) (Main)

Also would'nt mind figuring out how to remove the space in-between the "(Intro Edit) (Main)" as a side note. No sure if it can be done directly in the "Filename - Tag" function.

"Camila Cabello - Shameless (Intro Edit)(Main)"

Thanks in advance

---

<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: [January 21, 2024, 7:55am UTC](https://community.mp3tag.de/t/complex-filename-to-tag-how-to-keep-parentheses/63503/2 "2024-01-21T07:55:04Z")

</div>

Try an action of the type "Guess value" with  
Source: `$replace($regexp(%_filename%',(.*) \d+,$1),') (',')(')`  
Target format string: %artist% - %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: [February 20, 2024, 7:55am UTC](https://community.mp3tag.de/t/complex-filename-to-tag-how-to-keep-parentheses/63503/3 "2024-02-20T07:55:40Z")

</div>

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