# how to get the space after the  track number be deleted

**URL:** https://community.mp3tag.de/t/how-to-get-the-space-after-the-track-number-be-deleted/13348
**Category:** Support
**Created:** [April 22, 2012, 8:57pm UTC](https://community.mp3tag.de/t/how-to-get-the-space-after-the-track-number-be-deleted/13348 "2012-04-22T20:57:02Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![evergreen1](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/a9adbd/32.png) [@evergreen1](https://community.mp3tag.de/u/evergreen1)
#### Post date: [April 22, 2012, 8:57pm UTC](https://community.mp3tag.de/t/how-to-get-the-space-after-the-track-number-be-deleted/13348/1 "2012-04-22T20:57:02Z")

</div>

i have filenames such as

**101 pari malar**

i want to delete the space after the track number.

so it should look like \> **101pari malar**

how can i achieve this?

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [April 22, 2012, 9:23pm UTC](https://community.mp3tag.de/t/how-to-get-the-space-after-the-track-number-be-deleted/13348/2 "2012-04-22T21:23:21Z")

</div>

why do you such strange things to your file names?  
however:

Action: Format Value  
_or_   
Converter: Tag-Tag

Field: \_FILENAME  
Formatstring: $regexp(%\_filename%,^(\d+)\s+,$1)

---

<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: [April 23, 2012, 3:08am UTC](https://community.mp3tag.de/t/how-to-get-the-space-after-the-track-number-be-deleted/13348/3 "2012-04-23T03:08:57Z")

</div>

> [@evergreen1](#):
>
> i have filenames such as **101 pari malar** i want to delete the space after the track number.  
> so it should look like \> **101pari malar** how can i achieve this?

Use the **converter "Tag - Filename"** , or an action **"Format value"** on the field \_FILENAME, with the following scripting expression ...

**$left(%\_filename%,$sub($strchr(%\_filename%,' '),1))$cutLeft(%\_filename%,$strchr(%\_filename%,' '))**

Use the converter "Filename - Filename" ...

 

**Convert** | **Filename - Filename** | **ALT+3**

 

_Select format string_

 

Old filename pattern:  
**%1 %2**

 

New filename pattern:  
**%1%2**

 

Preview  
From:  
**101 pari malar.mp3**  
To:  
**101pari malar.mp3**

 

Be aware, if you later want to extract the track number from those merged file names, you might get into trouble.

DD.20120423.0707.CEST

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [April 23, 2012, 9:00am UTC](https://community.mp3tag.de/t/how-to-get-the-space-after-the-track-number-be-deleted/13348/4 "2012-04-23T09:00:18Z")

</div>

> [@DetlevD](#):
>
> Use the **converter "Tag - Filename"** , or an action **"Format value"** on the field \_FILENAME, with the following scripting expression ...
> 
> **$left(%\_filename%,$sub($strchr(%\_filename%,' '),1))$cutLeft(%\_filename%,$strchr(%\_filename%,' '))**

Why use such a complicated exp for such a simple task?

---

<div class="post-metadata">

### Author: ![evergreen1](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/a9adbd/32.png) [@evergreen1](https://community.mp3tag.de/u/evergreen1)
#### Post date: [April 23, 2012, 10:22am UTC](https://community.mp3tag.de/t/how-to-get-the-space-after-the-track-number-be-deleted/13348/5 "2012-04-23T10:22:09Z")

</div>

> [@pone](#):
>
> why do you such strange things to your file names?  
> however:
> 
> Action: Format Value  
> _or_   
> Converter: Tag-Tag
> 
> Field: \_FILENAME  
> Formatstring: $regexp(%\_filename%,^(\d+)\s+,$1)

thanks a lot for the suggestions. as to your qtn why i need such strange things. well. i think i should explain so that you may suggest another thing to get it sort out.

when i see the filenames in the explorer, some files with longer filenames comes in two lines. as a result. all the three tag fields are not visible. i should see all the three viz filename(line1), album(line2) and the artist(line3) . so i searched for a solution to cut short the filename, good people like you suggested how to cut short the filenames . i understand most of the filenames with 25 characters comes in a single line. so i restricted all filenames to 25 characters. even then a few filenames though they have only 25 characters including space between words come in double line. then i thought if i cut the space after the track number i could get them in a single line. as Deltaev suggested i am not going to delete the space after the track number. it does not look nice also. if you have any suggestion, please.

---

<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: [April 23, 2012, 11:22am UTC](https://community.mp3tag.de/t/how-to-get-the-space-after-the-track-number-be-deleted/13348/6 "2012-04-23T11:22:36Z")

</div>

> [@stevehero](#):
>
> Why use such a complicated exp for such a simple task?

Hm, this expression is written in the Mp3tag Scripting Language on the basic beginner level.  
All used functions are documented in the manual and easy to understand.  
Well stevehero, you can show a less complicated expression, without using the expert function $regexp ... 😉 ... wanted to say ... without using the power of a regular expression.

DD.20120423.1518.CEST

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [April 23, 2012, 11:42am UTC](https://community.mp3tag.de/t/how-to-get-the-space-after-the-track-number-be-deleted/13348/7 "2012-04-23T11:42:09Z")

</div>

> [@DetlevD](#):
>
> Hm, this expression is written in the Mp3tag Scripting Language on the basic beginner level.  
> All used functions are well documented in the manual and easy to understand.

True, but for new user's browsing this forum they may find it a little daunting to see that looooong exp to do what can be done with the same very simple action below. But I suppose its all about the option you choose to take.

> [@DetlevD](#):
>
> Well stevehero, you can show a less complicated expression, without using the expert function $regexp. 😉

_Action type:_ **Replace with regular expression**  
_Field:_ **\_FILENAME**  
_Regular expression:_ **^(\d+)\s+**  
_Replace matches with:_ **$1**

[] case-sensitive comparison **DONE :wink:**

While were on the matter, I see a lot of users pone, yourself etc using the format option with the $regexp function. Why choose this instead of using replace with regexp? Is it handled quicker inside of mp3tag?

---

<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: [April 23, 2012, 12:12pm UTC](https://community.mp3tag.de/t/how-to-get-the-space-after-the-track-number-be-deleted/13348/8 "2012-04-23T12:12:00Z")

</div>

> [@stevehero](#):
>
> ... they may find it a little daunting to see that looooong exp to do ...

Most people do not understand the cryptic Regular Expression Language and how a regular expression will be read or written.  
But there is a good chance that those people can understand a basic scripting language like the one, which Mp3tag provides.  
$sub, $left, $cutLeft are self explaining function names.

> [@stevehero](#):
>
> ... While were on the matter, I see a lot of users pone, yourself etc using the format option with the $regexp function. Why choose this instead of using replace with regexp? Is it handled quicker inside of mp3tag?

The result of the function $regexp can be prooved in the converter's preview.

DD.20120423.1606.CEST

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [April 23, 2012, 12:54pm UTC](https://community.mp3tag.de/t/how-to-get-the-space-after-the-track-number-be-deleted/13348/9 "2012-04-23T12:54:11Z")

</div>

> [@stevehero](#):
>
> While were on the matter, I see a lot of users pone, yourself etc using the format option with the $regexp function. Why choose this instead of using replace with regexp? Is it handled quicker inside of mp3tag?

As DetlevD says, the preview function is a great advantage.

And the new Tag-Tag Converter, where you can use this, is quicker than actions.

And the $regexp function can be combined with all other mp3tag scripting functions, making it much more adaptative.

And it isn't so complicated if you know the basic syntax: $regexp(string,expession,relpace)  
Only escaping scriting characters is more complicated here than in the action you prefer.

But in the end, it's a matter of personal taste.

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [April 23, 2012, 1:28pm UTC](https://community.mp3tag.de/t/how-to-get-the-space-after-the-track-number-be-deleted/13348/10 "2012-04-23T13:28:15Z")

</div>

> [@pone](#):
>
> But in the end, it's a matter of personal taste.

+1

I bought a program called Regexp Buddy so I use that for the function of previewing my regexp.

---

<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: [April 23, 2012, 2:52pm UTC](https://community.mp3tag.de/t/how-to-get-the-space-after-the-track-number-be-deleted/13348/11 "2012-04-23T14:52:48Z")

</div>

> [@pone](#):
>
> ... But in the end, it's a matter of personal taste.

Not only a matter of taste, but surely a matter of capabilities and skills.

DD.20120423.1848.CEST

---

<div class="post-metadata">

### Author: ![evergreen1](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/a9adbd/32.png) [@evergreen1](https://community.mp3tag.de/u/evergreen1)
#### Post date: [April 23, 2012, 10:23pm UTC](https://community.mp3tag.de/t/how-to-get-the-space-after-the-track-number-be-deleted/13348/12 "2012-04-23T22:23:13Z")

</div>

> [@evergreen1](#):
>
> thanks a lot for the suggestions. as to your qtn why i need such strange things. well. i think i should explain so that you may suggest another thing to get it sort out.
> 
> when i see the filenames in the explorer, some files with longer filenames comes in two lines. as a result. all the three tag fields are not visible. i should see all the three viz filename(line1), album(line2) and the artist(line3) . so i searched for a solution to cut short the filename, good people like you suggested how to cut short the filenames . i understand most of the filenames with 25 characters comes in a single line. so i restricted all filenames to 25 characters. even then a few filenames though they have only 25 characters including space between words come in double line. then i thought if i cut the space after the track number i could get them in a single line. as Deltaev suggested i am not going to delete the space after the track number. it does not look nice also. if you have any suggestion, please.

expecting an answer for the second para of this post. thanks for all .

---

<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:23pm UTC](https://community.mp3tag.de/t/how-to-get-the-space-after-the-track-number-be-deleted/13348/13 "2026-02-09T12:23:48Z")

</div>


