# Remove leading chars til first number is met

**URL:** https://community.mp3tag.de/t/remove-leading-chars-til-first-number-is-met/8624
**Category:** Support
**Created:** [July 18, 2009, 11:42am UTC](https://community.mp3tag.de/t/remove-leading-chars-til-first-number-is-met/8624 "2009-07-18T11:42:06Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![HHDM](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/848f3c/32.png) [@HHDM](https://community.mp3tag.de/u/HHDM)
#### Post date: [July 18, 2009, 11:42am UTC](https://community.mp3tag.de/t/remove-leading-chars-til-first-number-is-met/8624/1 "2009-07-18T11:42:06Z")

</div>

Hi

Is it possible to create an action that will remove leading chars until first number in a filename is met?

Example:

garbage\_more\_garbage\_1\_Hello\_world.mp3

should be converted to:

1\_Hello\_world.mp3

Kind regards  
HHDM

---

<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: [July 18, 2009, 1:15pm UTC](https://community.mp3tag.de/t/remove-leading-chars-til-first-number-is-met/8624/2 "2009-07-18T13:15:17Z")

</div>

> [@HHDM](#):
>
> ... Is it possible to create an action that will remove leading chars until first number in a filename is met?  
> Example:  
> garbage\_more\_garbage\_1\_Hello\_world.mp3  
> should be converted to:  
> 1\_Hello\_world.mp3  
> ...

Provided that the leading garbage part contains no number, then it should be easy, otherwise there is some sort of manual iteration needed.  
What action expression did you have tried so far?  
Are the underline characters part of the filename?

DD.20090718.1715.CEST

---

<div class="post-metadata">

### Author: ![HHDM](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/848f3c/32.png) [@HHDM](https://community.mp3tag.de/u/HHDM)
#### Post date: [July 18, 2009, 1:41pm UTC](https://community.mp3tag.de/t/remove-leading-chars-til-first-number-is-met/8624/3 "2009-07-18T13:41:13Z")

</div>

I'm new to regular expressions, so I've only tried basic search and replace expressions, what I need is a way to stop, once the search meets the first digit.

The garbage part contains no numbers.

The underline chars are part of the file name.

---

<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: [July 18, 2009, 1:51pm UTC](https://community.mp3tag.de/t/remove-leading-chars-til-first-number-is-met/8624/4 "2009-07-18T13:51:50Z")

</div>

> [@HHDM](#):
>
> ... The garbage part contains no numbers. ...

Well, then try this:  
_Actiontype 5:_ **Format tag field**  
_Field:_ **\_FILENAME**  
_Formatstring:_ **$regexp(%\_FILENAME%,'\[1\]+(.\*)',$1)**

Make sure to select only filenames which match the condition and then run the action against the selection.

DD.20090718.1748.CEST

* * *

1. ^\d

---

<div class="post-metadata">

### Author: ![HHDM](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/848f3c/32.png) [@HHDM](https://community.mp3tag.de/u/HHDM)
#### Post date: [July 18, 2009, 3:06pm UTC](https://community.mp3tag.de/t/remove-leading-chars-til-first-number-is-met/8624/5 "2009-07-18T15:06:26Z")

</div>

Perfect - thank you very much

---

<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:21pm UTC](https://community.mp3tag.de/t/remove-leading-chars-til-first-number-is-met/8624/6 "2026-02-09T12:21:39Z")

</div>


