# How to remove white space

**URL:** https://community.mp3tag.de/t/how-to-remove-white-space/17504
**Category:** Support
**Created:** [December 27, 2015, 5:58pm UTC](https://community.mp3tag.de/t/how-to-remove-white-space/17504 "2015-12-27T17:58:58Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Beluna](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/ed655f/32.png) [@Beluna](https://community.mp3tag.de/u/Beluna)
#### Post date: [December 27, 2015, 5:58pm UTC](https://community.mp3tag.de/t/how-to-remove-white-space/17504/1 "2015-12-27T17:58:58Z")

</div>

How do I remove the white space before and after the ":" for the following sample:

## Album Credits:

## Primary Artist: David Sanborn

## Featuring:

## Slam

## David Sanborn : alto Saxophone

Marcus Miller : bass, Keyboards, Percussion Programming

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [December 27, 2015, 7:00pm UTC](https://community.mp3tag.de/t/how-to-remove-white-space/17504/2 "2015-12-27T19:00:09Z")

</div>

> [@Beluna](#):
>
> How do I remove the white space before and after the ":" for the following sample: ...

**From: Album Credits: ---------------------------- Primary Artist:David Sanborn ---------------------------- Featuring: ---------------------------- Slam ---------------------------- David Sanborn : alto Saxophone ---------------------------- Marcus Miller : bass, Keyboards, Percussion Programming To: Album Credits: ---------------------------- Primary Artist:David Sanborn ---------------------------- Featuring: ---------------------------- Slam ---------------------------- David Sanborn:alto Saxophone ---------------------------- Marcus Miller:bass, Keyboards, Percussion Programming TEXT \<== $regexp(%TEXT%,'[\t]\*:[\t]\*',':')**

Note:  
There are 7 trailing spaces on this line ...

**"Primary Artist:David Sanborn\_\_\_\_\_\_\_"**** TEXT \<== $regexp(%TEXT%,' \*\r','\r')**

DD.20151227.2110.CET

See also ...  
[/t/12513/1](https://community.mp3tag.de/t/12513/1)  
[/t/14683/1](https://community.mp3tag.de/t/14683/1)  
[/t/14712/1](https://community.mp3tag.de/t/14712/1)  
[/t/13576/1](https://community.mp3tag.de/t/13576/1)

---

<div class="post-metadata">

### Author: ![Beluna](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/ed655f/32.png) [@Beluna](https://community.mp3tag.de/u/Beluna)
#### Post date: [December 28, 2015, 4:28am UTC](https://community.mp3tag.de/t/how-to-remove-white-space/17504/3 "2015-12-28T04:28:26Z")

</div>

I've tried this script the best... one problem if you know the solution.... I have alarge Database when i try to back it up it says not enough memory....

don't get... Any ideas....

if i grap a few albums it exports without a problem...

Thanks

---

<div class="post-metadata">

### Author: ![Beluna](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/ed655f/32.png) [@Beluna](https://community.mp3tag.de/u/Beluna)
#### Post date: [December 28, 2015, 4:35am UTC](https://community.mp3tag.de/t/how-to-remove-white-space/17504/4 "2015-12-28T04:35:00Z")

</div>

> [@Beluna](#):
>
> How do I remove the white space before and after the ":" for the following sample:
> 
> ## Album Credits:
> 
> ## Primary Artist: David Sanborn
> 
> ## Featuring:
> 
> ## Slam
> 
> ## David Sanborn : alto Saxophone
> 
> Marcus Miller : bass, Keyboards, Percussion Programming

I'm missing something.

first let me state this change goes under the field Performers

So using your syntax how would i write the text(also, the words should be Capped

Field: Performers  
Original  
Replace

To look like so:  
Marcus Miller : Bass, Keyboard

Thanks

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [December 28, 2015, 8:33am UTC](https://community.mp3tag.de/t/how-to-remove-white-space/17504/5 "2015-12-28T08:33:31Z")

</div>

> [@Beluna](#):
>
> ... how would i write the text ... To look like so: Marcus Miller : Bass, Keyboard ...

Within the set of "Mp3tag Scripting Functions" you can find ready made functions, which are made for applying changes to a text string, read there ... [https://docs.mp3tag.de/scripting](https://docs.mp3tag.de/scripting)

If you want to remove a known part of a text string, then you may apply one or more of the Mp3tag scripting functions, for example $replace, $regexp, $trim and so on.

For example, if you want to remove the text string **', Percussion Programming'** , then replace this text string with nothing.

If you especially want to change letters into uppercase or lowercase, then you may apply the functions $caps, $caps2, $caps3.

Dear 'Beluna', as an about 6 year long time user, since "Mp3tag Version: 2.45b" or earlier, you should know where to find the tools for the daily work (converter, action, function).

DD.20151228.1044.CET

---

<div class="post-metadata">

### Author: ![Beluna](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/ed655f/32.png) [@Beluna](https://community.mp3tag.de/u/Beluna)
#### Post date: [December 29, 2015, 3:05pm UTC](https://community.mp3tag.de/t/how-to-remove-white-space/17504/6 "2015-12-29T15:05:06Z")

</div>

> [@DetlevD](#):
>
> Within the set of "Mp3tag Scripting Functions" you can find ready made functions, which are made for applying changes to a text string, read there ... [https://docs.mp3tag.de/scripting](https://docs.mp3tag.de/scripting)
> 
> If you want to remove a known part of a text string, then you may apply one or more of the Mp3tag scripting functions, for example $replace, $regexp, $trim and so on.
> 
> For example, if you want to remove the text string **', Percussion Programming'** , then replace this text string with nothing.
> 
> If you especially want to change letters into uppercase or lowercase, then you may apply the functions $caps, $caps2, $caps3.
> 
> Dear 'Beluna', as an about 6 year long time user, since "Mp3tag Version: 2.45b" or earlier, you should know where to find the tools for the daily work (converter, action, function).
> 
> DD.20151228.1044.CET

I hear what you're saying. I was in the middle of batching a lot of files and thought I would reach out to find the solution. As you've shown from previous post, i've done this several times and created a whole collections of actions to fit my specific needs with no problems removing spaces and line, etc. In fact i thought I solved this issue before but it's not working.

However, I should have explained in more detail what the exact issue is. If i create the sample below, it works with no problem;makes all the changes, removing white space, caps, whatever. But if i just cut and paste, it's like its hard-coded. it doesn't follow the actions I have created.

Website: [http://sudo.3.pro.tok2.com/Quest/cards/D/D...born/index.html](http://sudo.3.pro.tok2.com/Quest/cards/D/DavidSanborn/index.html)

THE BAND:  
David Sanborn : alto saxophone  
Don Grolnick : keyboards  
Hiram Bullock : guitar, background vocal  
Buddy Williams : drums, background vocal  
Marcus Miller : bass guitar, synthesizer, background vocal  
ADDITIONAL MUSICIANS:  
Ralph MacDonald : percussion on 3,5,8  
Errol "Crusher" Bennett : percussion on 2  
Michael White : percussion on 7  
Hamish Stuart : lead vocalon 6  
background vocals : Lani Groves, Vivian Cherry, Frank Floyd on 8  
horns on 8 : Michael Brecker (tenor saxophone)  
Randy Brecker, Jon Faddis (trumpet)

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [December 29, 2015, 4:43pm UTC](https://community.mp3tag.de/t/how-to-remove-white-space/17504/7 "2015-12-29T16:43:46Z")

</div>

> [@Beluna](#):
>
> ... However, I should have explained in more detail what the exact issue is. ...

Please explain the exact issue.  
Could it be that the problem is ... the "tab" characters around the "colon" character?  
But this has been already solved within this thread.

Note: I can copy and paste the text from the given webpage without having any tab in the copied text.  
Example:

Anything You Want 

David Sanborn : alto saxophone  
Steve Gadd : drums  
Neil Jason : bass  
Don Grolnick : Fender Rhodes  
David Spinozza : electric guitar  
Jody Linscott : congas  
Ray Bardani : cowbell, rhythm tech tambourine  
Micharl Colina : Polymoog, Crumar  
handclaps : Rasy, Lisa, David & Spike

 

Could it be that the problem is ... the HTML TABLE code from within the webpage?  
For example ...

  

David Sanborn:  
alto saxophone

Rick Marotta: drums 

Well, I did some more tests, and there seems to be something new to me.  
After loading the same webpage using the Firefox browser, ...  
then copy&paste some text from the given webpage into Notepad++, ...  
then there are tab characters around each colon character, ...  
but when using old Internet Explorer there are space characters around each colon character.

 

But within the original webpage's HTML code there is no space character and no tab character coded, there exists only one colon character within a TD cell (... which misses the end tag ).

 

There seems to be some automatism within the copy&paste process, ...  
which leads to the creation of space character or tab character delimited TD values, ...  
depending on some internal behaviour or setting of the applied browser.

 

Such behaviour you have to take into account in your work, ...  
see example in post #2 in this thread.

 

DD.20151229.1944.CET

---

<div class="post-metadata">

### Author: ![Beluna](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/ed655f/32.png) [@Beluna](https://community.mp3tag.de/u/Beluna)
#### Post date: [December 29, 2015, 9:14pm UTC](https://community.mp3tag.de/t/how-to-remove-white-space/17504/8 "2015-12-29T21:14:45Z")

</div>

> [@DetlevD](#):
>
> Please explain the exact issue.  
> Could it be that the problem is ... the "tab" characters around the "colon" character?  
> But this has been already solved within this thread.
> 
> Note: I can copy and paste the text from the given webpage without having any tab in the copied text.  
> Example:
> 
> Anything You Want 
> 
> David Sanborn : alto saxophone  
> Steve Gadd : drums  
> Neil Jason : bass  
> Don Grolnick : Fender Rhodes  
> David Spinozza : electric guitar  
> Jody Linscott : congas  
> Ray Bardani : cowbell, rhythm tech tambourine  
> Micharl Colina : Polymoog, Crumar  
> handclaps : Rasy, Lisa, David & Spike
> 
>  
> 
> Could it be that the problem is ... the HTML TABLE code from within the webpage?  
> For example ...
> 
>   
> 
> David Sanborn:  
> alto saxophone
> 
> Rick Marotta: drums 
> 
> Well, I did some more tests, and there seems to be something new to me.  
> After loading the same webpage using the Firefox browser, ...  
> then copy&paste some text from the given webpage into Notepad++, ...  
> then there are tab characters around each colon character, ...  
> but when using old Internet Explorer there are space characters around each colon character.
> 
>  
> 
> But within the original webpage's HTML code there is no space character and no tab character coded, there exists only one colon character within a TD cell (... which misses the end tag ).
> 
>  
> 
> There seems to be some automatism within the copy&paste process, ...  
> which leads to the creation of space character or tab character delimited TD values, ...  
> depending on some internal behaviour or setting of the applied browser.
> 
>  
> 
> Such behaviour you have to take into account in your work, ...  
> see example in post #2 in this thread.
> 
>  
> 
> DD.20151229.1944.CET

Thanks... you've solved my problem. I use Firefox only, never even thought of an issue with the Browser. Used IE and the blocks are removed. And it takes the actions, I've created.

Thanks

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [December 30, 2015, 9:22am UTC](https://community.mp3tag.de/t/how-to-remove-white-space/17504/9 "2015-12-30T09:22:24Z")

</div>

> [@Beluna](#):
>
> Thanks... you've solved my problem. I use Firefox only, never even thought of an issue with the Browser. Used IE and the blocks are removed. And it takes the actions, I've created.Thanks

You have posted your original text here into the forum, and the tab characters were shown at least in the response dialog, strange that you have not even seen it for yourself.  
There is no need to change the browser.  
Above in post #2 ....  
[How to remove white space](https://community.mp3tag.de/t/17504/2)  
... you got an example how to treat the occurrence of space or tab character in one go by using the regex set [\t].

Well, there are other ways to make the the scripting compatible to different browser behaviour, for example replace the tab character with the space character: ...  
TEMP \<== $replace(%TEMP%,$char(9),$char(32))  
... or ...  
TEMP \<== $replace(%TEMP%,$char(9),' ')

DD.20151230.1122.CET

---

<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:26pm UTC](https://community.mp3tag.de/t/how-to-remove-white-space/17504/10 "2026-02-09T12:26:01Z")

</div>


