# Remove track numbers from titles and filenames

**URL:** https://community.mp3tag.de/t/remove-track-numbers-from-titles-and-filenames/45733
**Category:** Support
**Created:** [June 21, 2019, 3:43pm UTC](https://community.mp3tag.de/t/remove-track-numbers-from-titles-and-filenames/45733 "2019-06-21T15:43:43Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![RBEmerson](https://community.mp3tag.de/user_avatar/community.mp3tag.de/rbemerson/32/5040_2.png) [@RBEmerson](https://community.mp3tag.de/u/RBEmerson)
#### Post date: [June 21, 2019, 3:43pm UTC](https://community.mp3tag.de/t/remove-track-numbers-from-titles-and-filenames/45733/1 "2019-06-21T15:43:43Z")

</div>

[Mods - if the following isn't in the FAQ or how-to's, maybe it should be?]

How to remove numbers in front of titles or filenames:

Select the tracks to be changed (use Edit to "select all" or CTL-A to choose all tracks). Click on Action, seen at the top row . Choose Actions (Quick) from the dropdown actions list. In the new Action Type window, select "replace with regular expression" and click OK.  
In the new Replace with regular expression window's Field box enter TITLE (all caps!). In the regular expression box there are three possibilities:

(1) If the track numbers go 01, 02, 03 with no spaces before the numbers, type this expression exactly as it's given - cut &paste is OK:  
^[0-9]+\s\*  
(Meaning: Look from the front of the title for any quantity, including quantity zero, of numbers 0 through 9, and any quantity of spaces after the numbers)

(2) If there are spaces in front of the numbers, like this, 8, 9, 10, type or cut&paste:  
^\s\*[0-9]+\s\*  
(Meaning: Look from the front of the title for any quantity of spaces, any quantity of numbers 0 through 9, and any quantity of spaces after the numbers)

(3) If there are dashes ( - ) after the numbers, type:  
^\s\*\d+\s\*-\s\*  
(Meaning: Look from the front of the title for any quantity of spaces, any quantity of numbers 0 through 9, and any quantity of spaces after the numbers, a - after the spaces, and any quantity of spaces after the dash)

Leave "Replace matches with" empty. Anything typed in here will be added in front of each title.  
Do not click the "case-sensitive comparison" box. Numbers don't have upper or lower case, anyway.

Be sure the expression is right, the replace field is empty, the check box is empty, and click OK. If you like the results, save them. If you don't like the results, don't save them. It's that easy.

TITLE can be replaced with \_FILENAME to remove numbers, spaces, and dashes in front of filenames. Everything else works as it did for cleaning up titles.

After any these expressions are typed in, they'll be listed in the pull-down with the list of regular expressions. Pull down the list, chose the one you want, and there it is. No typing needed when working on a new set of tracks. The only challenge is remembering the expressions are there, and which one is the right one. Write yourself a note, or do enough work with Mp3tag to remember which expression does what. 😉

Thus endeth the lesson.

* * *

Trying to remove track numbers from titles has been posted to before, but most of the replies follow the form "RTFM but I'll give you a break and a how-to regular expression sample this time. How to use it is your challenge". Rather hostile IMNSHO.

---

<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: [June 21, 2019, 3:49pm UTC](https://community.mp3tag.de/t/remove-track-numbers-from-titles-and-filenames/45733/2 "2019-06-21T15:49:28Z")

</div>

> [@RBEmerson](#):
>
> but most of the replies follow the form "RTFM but I'll give you a break

Here is a different approach and no "RTFM" in it:

> [@trim track number from](https://community.mp3tag.de/t/trim-track-number-from/15713):
>
> all titles

Actually, there is an example in the HowTos:

> [@Actions and batch-operations](https://community.mp3tag.de/t/actions-and-batch-operations/967/11):
>
> How to remove/trim leading track numbers? Action type: Replace with regular expressions Regular expression: ^\s\*\d+\s\*-\s\* Replace matches with: This regular expression removes the track number from 01 - Anything.. so that only Anything... remains. ^ matches the beginning of the string. Then any numbers of whitespaces \s\* followed by numbers from 0-9. The \s\*-\s\* part removes the hyphen and any whitespace characters around it.

---

<div class="post-metadata">

### Author: ![RBEmerson](https://community.mp3tag.de/user_avatar/community.mp3tag.de/rbemerson/32/5040_2.png) [@RBEmerson](https://community.mp3tag.de/u/RBEmerson)
#### Post date: [June 21, 2019, 4:04pm UTC](https://community.mp3tag.de/t/remove-track-numbers-from-titles-and-filenames/45733/3 "2019-06-21T16:04:53Z")

</div>

Using trim works, of course. But finding and using it becomes its own hunt-for.

Many how-to's have multiple solutions, no question about that. My intent is to describe a procedure which is reasonably simple and effective. Think of it as a tiny "For Dummies" book: _Removing Numbers From Titles For Dummies_ (I strongly dislike the "dummies" part, but "idiots" or "complete idiot" book titles are even worse).

I could have left out the Meaning: comments, but the pedantic in me won't let that happen. LOL

---

<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: [June 21, 2019, 4:32pm UTC](https://community.mp3tag.de/t/remove-track-numbers-from-titles-and-filenames/45733/4 "2019-06-21T16:32:39Z")

</div>

> [@RBEmerson](#):
>
> My intent is to describe a procedure which is reasonably simple and effective

Your examples feature `[0-9]` for which there is the set `\d`, so

> [@RBEmerson](#):
>
> \[1\]+\s\*

could be shortened to  
`^\d+\s`  
which is 3 characters shorter.  
Then if this is to become

> [@RBEmerson](#):
>
> a tiny "For Dummies" book

I would alter the title of this thread. Your examples do not "Remove track numbers from titles and filenames" but remove only "leading numbers from titles and filenames". As there is no restriction to the length of the number, it could just as well be a number that represents the episode or the year or some id or whatever numeric prefix there is ...  
although ... the examples do not remove any number but just the leading ones. So it may be worthwhile to help others to find your instruction as the best help with a title that is as exact as possible.  
I hope that

> [@RBEmerson](#):
>
> the pedantic in

you will see what I mean.

* * *

1. 0-9

---

<div class="post-metadata">

### Author: ![RBEmerson](https://community.mp3tag.de/user_avatar/community.mp3tag.de/rbemerson/32/5040_2.png) [@RBEmerson](https://community.mp3tag.de/u/RBEmerson)
#### Post date: [June 24, 2019, 5:34am UTC](https://community.mp3tag.de/t/remove-track-numbers-from-titles-and-filenames/45733/5 "2019-06-24T05:34:59Z")

</div>

And I thought I was pedantic...

Regexp's can always be shortened and done in any number of ways. The point here is only to get the job done.

"Remove leading numbers"... well, of course. In the context of Mp3tag it's safe to assume that the majority of leading numbers are track or sequence numbers. Given the whole discussion is for those who don't know how to use regular expressions and/or just want to get on with losing those numbers, this is an effective "magic spell" titled to help searches come up with making those track or sequence numbers go away.

If that doesn't fit your world, do your write-up to your satisfaction. Past that, let it go.

On this topic, I'm out.

---

<div class="post-metadata">

### Author: ![xpac5896a](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/x/85f322/32.png) [@xpac5896a](https://community.mp3tag.de/u/xpac5896a)
#### Post date: [September 24, 2023, 9:24pm UTC](https://community.mp3tag.de/t/remove-track-numbers-from-titles-and-filenames/45733/6 "2023-09-24T21:24:37Z")

</div>

The actions you describe have been very useful to me, however at the present time I have encountered a different type of numbering after converting .wma to .mp3. The converter adds an underbar (\_) after the number and I have tried ^\s\*\d+\s\*-\s but it doesn't work. Is there another formula that can be used in this case?

---

<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: [September 24, 2023, 9:36pm UTC](https://community.mp3tag.de/t/remove-track-numbers-from-titles-and-filenames/45733/7 "2023-09-24T21:36:35Z")

</div>

> [@xpac5896a](#):
>
> underbar (\_) after the number and I have tried ^\s\*\d+\s\*-\s

AFAI can tell, you use the `-` and not the `_` in your regular expression.

For more support, please show us preferably a screenshot of the action/function and the original data.

---

<div class="post-metadata">

### Author: ![xpac5896a](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/x/85f322/32.png) [@xpac5896a](https://community.mp3tag.de/u/xpac5896a)
#### Post date: [September 25, 2023, 12:39am UTC](https://community.mp3tag.de/t/remove-track-numbers-from-titles-and-filenames/45733/8 "2023-09-25T00:39:58Z")

</div>

So I should convert ^\s\*\d+\s\*-\s to ^\s\*\d+\s\*\_\s. I hope. I don't code so this is my best guess.

---

<div class="post-metadata">

### Author: ![MotleyG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/motleyg/32/440_2.png) [@MotleyG](https://community.mp3tag.de/u/MotleyG)
#### Post date: [September 25, 2023, 1:04am UTC](https://community.mp3tag.de/t/remove-track-numbers-from-titles-and-filenames/45733/9 "2023-09-25T01:04:36Z")

</div>

Of course, if you already have the correct data in the typical metadata tag fields, you can instead use the Converter Tag\>Filename function and rename your files completely with fresh details that you prefer from those fields.

---

<div class="post-metadata">

### Author: ![xpac5896a](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/x/85f322/32.png) [@xpac5896a](https://community.mp3tag.de/u/xpac5896a)
#### Post date: [September 28, 2023, 4:18pm UTC](https://community.mp3tag.de/t/remove-track-numbers-from-titles-and-filenames/45733/10 "2023-09-28T16:18:27Z")

</div>

> [@xpac5896a](#):
>
> ^\s\*\d+\s\*-\s

I have tried the ^\s\*\d+\s\*-\s and it doesn't, however I will change the prior expression to ^\s\*\d+\s\*\_\s and see how that works. Will let you know the results

---

<div class="post-metadata">

### Author: ![xpac5896a](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/x/85f322/32.png) [@xpac5896a](https://community.mp3tag.de/u/xpac5896a)
#### Post date: [September 28, 2023, 5:29pm UTC](https://community.mp3tag.de/t/remove-track-numbers-from-titles-and-filenames/45733/11 "2023-09-28T17:29:22Z")

</div>

It works. So, if you have an `(_)` change expression to `^\s*\d+\s*_\s*.` Thanks guys.

---

<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: [October 28, 2023, 5:29pm UTC](https://community.mp3tag.de/t/remove-track-numbers-from-titles-and-filenames/45733/12 "2023-10-28T17:29:29Z")

</div>

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