How to remove white space

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

Album Credits:

Primary Artist: David Sanborn



David Sanborn : alto Saxophone

Marcus Miller : bass, Keyboards, Percussion Programming

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]*',':')

There are 7 trailing spaces on this line ...

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


See also ...

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...


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

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 ...

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).


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.


David Sanborn : alto saxophone
Don Grolnick : keyboards
Hiram Bullock : guitar, background vocal
Buddy Williams : drums, background vocal
Marcus Miller : bass guitar, synthesizer, background vocal
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)

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.

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.


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
... 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),' ')