# Super Regular Expression to remove Track numbers

**URL:** <https://community.mp3tag.de/t/super-regular-expression-to-remove-track-numbers/15992>\
**Category:** Support\
**Created:** [August 12, 2014, 2:05pm UTC](https://community.mp3tag.de/t/super-regular-expression-to-remove-track-numbers/15992 "2014-08-12T14:05:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![cldcp00](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/838e76/32.png) [@cldcp00](https://community.mp3tag.de/u/cldcp00)\
**Post date:** [August 12, 2014, 2:05pm UTC](https://community.mp3tag.de/t/super-regular-expression-to-remove-track-numbers/15992/1 "2014-08-12T14:05:00Z")

</div>

Hi,

I know that you could run separate Regex's to remove the track numbers, but is there a super expression that can capture all the below track numbers patterns and remove them

01.GimmeSympathy  
01 .GimmeSympathy  
01 . GimmeSympathy  
01-GimmeSympathy  
01 -GimmeSympathy  
01 - GimmeSympathy  
01 GimmeSympathy

Thanks in advance!

---

<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:** [August 12, 2014, 4:00pm UTC](https://community.mp3tag.de/t/super-regular-expression-to-remove-track-numbers/15992/2 "2014-08-12T16:00:56Z")

</div>

Action: Replace with regular expression for the field.  
Search pattern: \d+\W\*(\u.\*)  
Replace string: $1

Searches for something starting with digits followed by something else and then an Upper Case letter.

---

<div class="post-metadata">

**Author:** ![cldcp00](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/838e76/32.png) [@cldcp00](https://community.mp3tag.de/u/cldcp00)\
**Post date:** [August 12, 2014, 8:37pm UTC](https://community.mp3tag.de/t/super-regular-expression-to-remove-track-numbers/15992/3 "2014-08-12T20:37:56Z")

</div>

> [@ohrenkino](#):
>
> Action: Replace with regular expression for the field.  
> Search pattern: \d+\W\*(\u.\*)  
> Replace string: $1
> 
> Searches for something starting with digits followed by something else and then an Upper Case letter.

Thanks for your reply

Just wondering will the regex work if the following is not upper case letter. There will be times when it could be lower case  
Regards

---

<div class="post-metadata">

**Author:** ![JJ\_Johnson](https://community.mp3tag.de/user_avatar/community.mp3tag.de/jj_johnson/32/67_2.png) [@JJ\_Johnson](https://community.mp3tag.de/u/JJ_Johnson)\
**Post date:** [August 12, 2014, 10:49pm UTC](https://community.mp3tag.de/t/super-regular-expression-to-remove-track-numbers/15992/4 "2014-08-12T22:49:30Z")

</div>

You could use

\d+\W\*(.\*)

But there's another possible problem: \W is the negation of \w, or word characters. Word characters include letters (both upper and lower case), digits, and the underscore. The underscore could be an issue.

For instance, it would change

06\_Some Title

to

\_Some Title

The following may be better:

\d+[^0-9A-Za-z]_(._)

---

<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:** [August 13, 2014, 4:17am UTC](https://community.mp3tag.de/t/super-regular-expression-to-remove-track-numbers/15992/5 "2014-08-13T04:17:58Z")

</div>

> [@Dego](#):
>
> Thanks for your reply
> 
> Just wondering will the regex work if the following is not upper case letter. There will be times when it could be lower case  
> Regards

You have to look for a delimiter between the data you want to keep and that you don't.  
This could be  
a fixed position or  
a unique character or  
a pattern.  
Your example show that you neither have a fixed position nor a unique character. If you now cut out the unique pattern as well then you have lost. Or you have to define a new expression that deals with the other pattern.

@jj: the regexp 'd+[^0-9A-Za-z]_(._)' returns for "01.GimmeSympathy" again "01.GimmeSympathy" - am I missing something?

---

<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:** [August 13, 2014, 5:25am UTC](https://community.mp3tag.de/t/super-regular-expression-to-remove-track-numbers/15992/6 "2014-08-13T05:25:10Z")

</div>

> [@Dego](#):
>
> ... is there a super expression that can capture all the below track numbers patterns and remove them ...

**From:**

**01.GimmeSympathy  
01 .GimmeSympathy  
01 . GimmeSympathy  
01-GimmeSympathy  
01 -GimmeSympathy  
01 - GimmeSympathy  
01 GimmeSympathy  
To:  
GimmeSympathy**

 

This is a Mp3tag standard scripting function ...

 **$trimLeft(%TITLE%,'0123456789 -.')** 

This is a Mp3tag regular expression scripting function ...

 **$regexp(%TITLE%,'^[\d\s\-\.]+',)** 

Be aware, when having a TITLE like ...  
01 - 416 Conspiracy Theories  
... this will become ...  
Conspiracy Theories

 

Therefore better to use ...

 **From:**

**01.416 Conspiracy Theories  
01 .416 Conspiracy Theories  
01 . 416 Conspiracy Theories  
01-416 Conspiracy Theories  
01 -416 Conspiracy Theories  
01 - 416 Conspiracy Theories  
01 416 Conspiracy Theories  
To:  
416 Conspiracy Theories**

 **$regexp(%TITLE%,'^\d+[\s\-\.]+',)** 

... or more restrictive ...

 **$regexp(%TITLE%,'^\d\d[\s\-\.]+',)** 

DD.20140813.1151.CEST

---

<div class="post-metadata">

**Author:** ![JJ\_Johnson](https://community.mp3tag.de/user_avatar/community.mp3tag.de/jj_johnson/32/67_2.png) [@JJ\_Johnson](https://community.mp3tag.de/u/JJ_Johnson)\
**Post date:** [August 13, 2014, 5:56pm UTC](https://community.mp3tag.de/t/super-regular-expression-to-remove-track-numbers/15992/7 "2014-08-13T17:56:10Z")

</div>

> [@ohrenkino](#):
>
> @jj: the regexp 'd+[^0-9A-Za-z]_(._)' returns for "01.GimmeSympathy" again "01.GimmeSympathy" - am I missing something?

Is that a typo? You actually mean

\d+[^0-9A-Za-z]_(._)

don't you? This works for me.

---

<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:** [August 13, 2014, 6:10pm UTC](https://community.mp3tag.de/t/super-regular-expression-to-remove-track-numbers/15992/8 "2014-08-13T18:10:39Z")

</div>

> [@JJ Johnson](#):
>
> Is that a typo?...

Yes, sorry. You are quite right.

---

<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:25pm UTC](https://community.mp3tag.de/t/super-regular-expression-to-remove-track-numbers/15992/9 "2026-02-09T12:25:11Z")

</div>

Closed on February 9, 2026, 12:25pm UTC


