# Adding or removing unnecessary spaces

**URL:** <https://community.mp3tag.de/t/adding-or-removing-unnecessary-spaces/41068>\
**Category:** Support\
**Created:** [March 13, 2018, 4:43pm UTC](https://community.mp3tag.de/t/adding-or-removing-unnecessary-spaces/41068 "2018-03-13T16:43:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DjPari](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/65b543/32.png) [@DjPari](https://community.mp3tag.de/u/DjPari)\
**Post date:** [March 13, 2018, 4:43pm UTC](https://community.mp3tag.de/t/adding-or-removing-unnecessary-spaces/41068/1 "2018-03-13T16:43:46Z")

</div>

i want a script or bunch of scripts to correct the spaces in my tags(not filename)  
for example  
Original  
The Doctor ' s Team, and " Nurse "(New) [Old]

desired  
The Doctor's Team,and Nurse(New)[Old]

with one space between normal words,no spaces before or after the single(') and double(")  
no space before,and after the different types of brackets(I know clearing the spaces just after the bracket before the word starts may be impossible as it may also clear the spaces between words ans join them) and i know that i will have to use different variants of the scrips for the different types of 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:** [March 13, 2018, 7:00pm UTC](https://community.mp3tag.de/t/adding-or-removing-unnecessary-spaces/41068/2 "2018-03-13T19:00:27Z")

</div>

> [@DjPari](#):
>
> and i know that i will have to use different variants of the scrips for the different types of brackets.

You can use an action of the type "Format value" for TITLE and use as  
Format string: `$replace(%title%,' ,',',',' (','(',' [',']')`  
(to be continued for all the variations where you want to remove the space)  
I would add a simple replace action to remove the spaces around the apostrophes as you have to add some apostrophes to escape them in the $replace() function. And that would make the expression rather unreadable.

---

<div class="post-metadata">

**Author:** ![DjPari](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/65b543/32.png) [@DjPari](https://community.mp3tag.de/u/DjPari)\
**Post date:** [March 14, 2018, 4:38pm UTC](https://community.mp3tag.de/t/adding-or-removing-unnecessary-spaces/41068/3 "2018-03-14T16:38:45Z")

</div>

i sorted it out with about 7 single simple replace scripts like  
replace [space] (  
with [no space] (  
etc..thanks anyway

---

<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:27pm UTC](https://community.mp3tag.de/t/adding-or-removing-unnecessary-spaces/41068/4 "2026-02-09T12:27:17Z")

</div>


