# How to Removing Title ending with zeros? ?

**URL:** https://community.mp3tag.de/t/how-to-removing-title-ending-with-zeros/17799
**Category:** Support
**Created:** [March 29, 2016, 7:19am UTC](https://community.mp3tag.de/t/how-to-removing-title-ending-with-zeros/17799 "2016-03-29T07:19:56Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![AdrleeCasa](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/4491bb/32.png) [@AdrleeCasa](https://community.mp3tag.de/u/AdrleeCasa)
#### Post date: [March 29, 2016, 7:19am UTC](https://community.mp3tag.de/t/how-to-removing-title-ending-with-zeros/17799/1 "2016-03-29T07:19:56Z")

</div>

I am new to mp3tag, was wondering if someone can assist me in an action script that helps remove the zero in my title fields, Example Psalms 001 to just Psalms 1, and Psalms 020 to just Psalms 20..

Pls see attach picture of what I mean..

Thks.

 ![](https://community.mp3tag.de/uploads/default/original/2X/e/e65d06a23e6ff705684c5f5f4d5fbce7f0f9c11a.jpg)

---

<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: [March 29, 2016, 7:26am UTC](https://community.mp3tag.de/t/how-to-removing-title-ending-with-zeros/17799/2 "2016-03-29T07:26:41Z")

</div>

> [@Adrian Lee](#):
>
> I am new to mp3tag, was wondering if someone can assist me in an action script that helps remove the zero in my title fields, Example Psalms 001 to just Psalms 1, and Psalms 020 to just Psalms 20..
> 
> Pls see attach picture of what I mean..
> 
> Thks.

Create an action of the type "Replace" for TITLE  
Search string: 0  
(the 0 has a blank in front,  
Replace string:  
(leave empty)

Or if you want to be sure that only the zero behind Psalms gets removed, use  
Format string: Psalms 0  
Replace String: Psalms  
(with a blank behind the last s)

Repeat the action until there are no more leading zeros.

If you are not sure about actions, see the FAQs: [/t/967/1](https://community.mp3tag.de/t/967/1)

---

<div class="post-metadata">

### Author: ![AdrleeCasa](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/4491bb/32.png) [@AdrleeCasa](https://community.mp3tag.de/u/AdrleeCasa)
#### Post date: [March 29, 2016, 7:39am UTC](https://community.mp3tag.de/t/how-to-removing-title-ending-with-zeros/17799/3 "2016-03-29T07:39:17Z")

</div>

> [@ohrenkino](#):
>
> Create an action of the type "Replace" for TITLE  
> Search string: 0  
> (the 0 has a blank in front,  
> Replace string:  
> (leave empty)
> 
> Or if you want to be sure that only the zero behind Psalms gets removed, use  
> Format string: Psalms 0  
> Replace String: Psalms  
> (with a blank behind the last s)
> 
> Repeat the action until there are no more leading zeros.
> 
> If you are not sure about actions, see the FAQs: [/t/967/1](https://community.mp3tag.de/t/967/1)

Thks ohrenkino, but suppose I do not like to type in Psalms 0, because I have many books of the Biblical Title to remove these "0" is there another way if doing it ? The method I use was just to replace 0 with nothing but guess what it also remove Psalms 020 to Psalms 2...so I need a good script that I can use to do for all the rest of the Biblical Titles as well..Thks

---

<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: [March 29, 2016, 8:35am UTC](https://community.mp3tag.de/t/how-to-removing-title-ending-with-zeros/17799/4 "2016-03-29T08:35:21Z")

</div>

> [@Adrian Lee](#):
>
> How to Removing Title ending with zeros?  
> I am new ... was wondering if someone can assist me in an action script that helps remove the zero in my title fields, Example Psalms 001 to just Psalms 1, and Psalms 020 to just Psalms 20. ...

How to Removing Title ending with zeros? ? ? ? ? ? ? ?  
Hmm ...

Please consider, if this column will be sorted, whether the result might then look like this:

From sorted ...

19\_Psalms 001  
19\_Psalms 002  
19\_Psalms 003  
19\_Psalms 010  
19\_Psalms 011  
19\_Psalms 012  
19\_Psalms 100  
19\_Psalms 101

 

To sorted ...  
19\_Psalms 1  
19\_Psalms 10  
19\_Psalms 100  
19\_Psalms 101  
19\_Psalms 11  
19\_Psalms 12  
19\_Psalms 2  
19\_Psalms 3

 **Convert "Tag - Tag" ... or ... Action "Format value" Field: TITLE Formatstring: $regexp(%TITLE%,'0\*(\d+)$','$1')** 

DD.20160329.1254.CEST

---

<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: [March 29, 2016, 8:44am UTC](https://community.mp3tag.de/t/how-to-removing-title-ending-with-zeros/17799/5 "2016-03-29T08:44:14Z")

</div>

> [@Adrian Lee](#):
>
> ...replace 0 with nothing but guess what it also remove Psalms 020 to Psalms 2......

Yes, I know. That is why I originally suggested:

> [@](#):
>
> Create an action of the type "Replace" for TITLE  
> Search string: 0  
> (the 0 has a blank in front,  
> Replace string:  
> (leave empty)

because 020 will not loose its second 0 as there is no blank in front of it but a 2.  
DetlevD's notes on sorting should also be considered.

---

<div class="post-metadata">

### Author: ![Rijkstra](https://community.mp3tag.de/user_avatar/community.mp3tag.de/rijkstra/32/22_2.png) [@Rijkstra](https://community.mp3tag.de/u/Rijkstra)
#### Post date: [March 29, 2016, 3:14pm UTC](https://community.mp3tag.de/t/how-to-removing-title-ending-with-zeros/17799/6 "2016-03-29T15:14:51Z")

</div>

> [@ohrenkino](#):
>
> Create an action of the type "Replace" for TITLE  
> Search string: 0  
> (the 0 has a blank in front,  
> Replace string:  
> (leave empty)
> 
> Or if you want to be sure that only the zero behind Psalms gets removed, use  
> Format string: Psalms 0  
> Replace String: Psalms  
> (with a blank behind the last s)
> 
> Repeat the action until there are no more leading zeros.
> 
> If you are not sure about actions, see the FAQs: [/t/967/1](https://community.mp3tag.de/t/967/1)

Replace string: (leave empty)? I think you wamt a space there.

I'd replace with regular expression:

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

[] case-sensitive comparison

I believe those leading zeroes are there to solve a sorting problem. You might want to leave them in another field and use it to sort.

---

<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: [March 29, 2016, 5:49pm UTC](https://community.mp3tag.de/t/how-to-removing-title-ending-with-zeros/17799/7 "2016-03-29T17:49:06Z")

</div>

> [@Rijkstra](#):
>
> Replace string: (leave empty)? I think you wamt a space there.
> 
> I'd replace with regular expression:  
> ...

You are right about the space there.  
I am always a little reluctant to "assault" a new user with regular expressions. That is why suggested a plain "replace".

---

<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:26pm UTC](https://community.mp3tag.de/t/how-to-removing-title-ending-with-zeros/17799/8 "2026-02-09T12:26:10Z")

</div>


