# Remove numbers before filename or artist?

**URL:** <https://community.mp3tag.de/t/remove-numbers-before-filename-or-artist/19626>\
**Category:** Support\
**Created:** [December 24, 2017, 4:07pm UTC](https://community.mp3tag.de/t/remove-numbers-before-filename-or-artist/19626 "2017-12-24T16:07:50Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![rogerde2](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/85f322/32.png) [@rogerde2](https://community.mp3tag.de/u/rogerde2)\
**Post date:** [December 24, 2017, 4:07pm UTC](https://community.mp3tag.de/t/remove-numbers-before-filename-or-artist/19626/1 "2017-12-24T16:07:50Z")

</div>

Hi,

I'm look for a way to remove the number(s) from the following string. Either in the filename or Artist.

Filename Structure: 16.David Guetta Feat. Emeli Sande - What I Did For Love.mp3

Artist Name Structure: 16.David Guetta Feat. Emeli Sande

What I would like to get rid of is the 16.

I have some files that also would be just 16 with no .

Can some please explain how to do this?

Much appreciated 🙂 ![:huh:](https://community.mp3tag.de/uploads/default/original/1X/f15ee73c0fd9ec3b0db7481f0558638f8ee224ce.gif ":huh:") ![:huh:](https://community.mp3tag.de/uploads/default/original/1X/f15ee73c0fd9ec3b0db7481f0558638f8ee224ce.gif ":huh:")

---

<div class="post-metadata">

**Author:** ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)\
**Post date:** [December 24, 2017, 4:32pm UTC](https://community.mp3tag.de/t/remove-numbers-before-filename-or-artist/19626/2 "2017-12-24T16:32:40Z")

</div>

I would change the artist-name first and after changing rebuild the filename from the tags.

You could define actions group or - especially for newbies - it is easier to take the converter. The converter has a preview and it shows the result of your format-string-definitions.

1. Convert  
Tag - Tag  
Field: TITLE  
Formatstring: $cutleft(%artist%,3)

This only works if there always 3 characters at the start.

1. Rebuilding the filename:  
Tag - Filename  
Formatstring: %artist% - %title%

---

<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:** [December 24, 2017, 4:39pm UTC](https://community.mp3tag.de/t/remove-numbers-before-filename-or-artist/19626/3 "2017-12-24T16:39:32Z")

</div>

> [@rogerde2](#):
>
> What I would like to get rid of is the 16.
> 
> I have some files that also would be just 16 with no . do this?

This is best done with the regular expression built in action which will take care of both scenarios.

Use for replace in two actions in one group for filename and artist:

^\d+\.\*

Replace with:  
Leave this field blank

---

<div class="post-metadata">

**Author:** ![Cat](https://community.mp3tag.de/user_avatar/community.mp3tag.de/cat/32/11996_2.png) [@Cat](https://community.mp3tag.de/u/Cat)\
**Post date:** [December 24, 2017, 6:21pm UTC](https://community.mp3tag.de/t/remove-numbers-before-filename-or-artist/19626/4 "2017-12-24T18:21:13Z")

</div>

> [@stevehero](#):
>
> This is best done with the regular expression built in action which will take care of both scenarios.
> 
> Use for replace in two actions in one group for filename and artist:
> 
> ^\d+\.\*
> 
> Replace with:  
> Leave this field blank

That's helpful. Thanks. I never did get up to speed with regular expressions.

I use the cutLeft and mid/substr (whatever) functions to sort out Titles that have been copied from the filename - where the filename includes track number and album ...I have to modify the action each time, and count the characters.

To strip the track numbers, or replace the full stops/periods with hyphens (like replace "12." or "12. " with "12 - The Track Title"), I use **RenamerNG** (free program). Much easier (perhaps even if you're familiar with the mp3tag scripts/coding, because you can perform the actions on selected files, the Trim and Replace and Insert dialogs show you what the result will be, and you can Undo if it's messed-up.)

---

<div class="post-metadata">

**Author:** ![rogerde2](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/85f322/32.png) [@rogerde2](https://community.mp3tag.de/u/rogerde2)\
**Post date:** [December 24, 2017, 11:15pm UTC](https://community.mp3tag.de/t/remove-numbers-before-filename-or-artist/19626/5 "2017-12-24T23:15:48Z")

</div>

So I am a newbie to this site and stuff...

Thanks for all your great tips and suggestions! 🙂

on this one from stevehero.

Not sure what to do with that script/command?

Can you walk me through what to select, and/or to do?

^\d+.\*

so do I start with tag to tag choose artist then type this script and that should take care of it? Or is there there more to it?

---

<div class="post-metadata">

**Author:** ![rogerde2](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/r/85f322/32.png) [@rogerde2](https://community.mp3tag.de/u/rogerde2)\
**Post date:** [December 24, 2017, 11:17pm UTC](https://community.mp3tag.de/t/remove-numbers-before-filename-or-artist/19626/6 "2017-12-24T23:17:06Z")

</div>

> [@stevehero](#):
>
> This is best done with the regular expression built in action which will take care of both scenarios.
> 
> Use for replace in two actions in one group for filename and artist:
> 
> ^\d+\.\*
> 
> Replace with:  
> Leave this field blank

So I am a newbie to this site and stuff...

Thanks for all your great tips and suggestions!

on this one from stevehero.

Not sure what to do with that script/command?

Can you walk me through what to select, and/or to do?

^\d+.\*

so do I start with tag to tag choose artist then type this script and that should take care of it? Or is there there more to it?

---

<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:** [December 24, 2017, 11:30pm UTC](https://community.mp3tag.de/t/remove-numbers-before-filename-or-artist/19626/7 "2017-12-24T23:30:33Z")

</div>

The new regular expression should be for the OP

^\d+\s\*[\.|-]\s\*

That should cover all your bases.

For the person asking how to use it. Use an action. See [FAQ](https://community.mp3tag.de/c/faq-frequently-asked-questions) section on that and use the **Replace with regular expression** one.

From here choose the tag you want to affect, enter in that regular expression I posted and leave the replace with field blank if you ONLY want to do the same as the OP.

---

<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:** [December 25, 2017, 12:25pm UTC](https://community.mp3tag.de/t/remove-numbers-before-filename-or-artist/19626/8 "2017-12-25T12:25:42Z")

</div>

> [@Cat](#):
>
> ... **RenamerNG** (free program). Much easier ...

I doubt that anything could be easier and just as powerful as the functions in MP3tag.  
You can do just the same things and many more with MP3tag, with the advantage that you do not have to leave MP3tag to start an external program which probably has no options to recycle any tag data.  
I would think that it would be much better to get acquainted with the powers of MP3tag and leave that promoted program of yours where it is.

---

<div class="post-metadata">

**Author:** ![SpirosG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/spirosg/32/8589_2.png) [@SpirosG](https://community.mp3tag.de/u/SpirosG)\
**Post date:** [April 23, 2020, 9:28pm UTC](https://community.mp3tag.de/t/remove-numbers-before-filename-or-artist/19626/9 "2020-04-23T21:28:04Z")

</div>

> [@stevehero](#):
>
> The new regular expression should be for the OP
> 
> ^\d+\s\*[.|-]\s\*
> 
> That should cover all your bases.

So i was facing a problem, the usual action suggested mostly wasn't behaving correctly because it was also removing the digits from some artists (ex.2 chainz, 20 fingers, 5 seconds of mars etc).

But the one suggested by @stevehero`^\d+\s*[\.|-]\s*` is removing only the tracknumbers.

---

<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, 2020, 10:25pm UTC](https://community.mp3tag.de/t/remove-numbers-before-filename-or-artist/19626/10 "2020-04-23T22:25:41Z")

</div>

> [@stevehero](#):
>
> ^\d+\s\*[.|-]\s\*

Different strokes for different folks.

`^\d+\s*\.\s*` Will work for **16.David Guetta Feat. Emeli Sande** but not **2 chainz, 20 fingers, 5 seconds of mars**

---

<div class="post-metadata">

**Author:** ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)\
**Post date:** [April 24, 2020, 7:24am UTC](https://community.mp3tag.de/t/remove-numbers-before-filename-or-artist/19626/11 "2020-04-24T07:24:56Z")

</div>

> [@stevehero](#):
>
> Different strokes for different folks.

Mostly correct, but don't forget artists with names like:  
[1.Kla$](https://musicbrainz.org/artist/4abb743b-57e6-4f34-90d5-7ce92086b2d6)  
[2. Maanantaii](https://musicbrainz.org/artist/6be5d2bc-b2b1-4413-a87b-68d4d05c4eb4)

There are always exceptions 😉

---

<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 24, 2020, 1:19pm UTC](https://community.mp3tag.de/t/remove-numbers-before-filename-or-artist/19626/12 "2020-04-24T13:19:56Z")

</div>

Absolutely, which is why I NEVER EVER EVER run actions on the filename. Always tag then use that info to format the FN.

🙂

---

<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:27pm UTC](https://community.mp3tag.de/t/remove-numbers-before-filename-or-artist/19626/13 "2026-02-09T12:27:09Z")

</div>


