# Adding leading zeros to an extended field

**URL:** https://community.mp3tag.de/t/adding-leading-zeros-to-an-extended-field/8769
**Category:** Support
**Created:** [August 13, 2009, 9:34am UTC](https://community.mp3tag.de/t/adding-leading-zeros-to-an-extended-field/8769 "2009-08-13T09:34:16Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Funky-t](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/d2c977/32.png) [@Funky-t](https://community.mp3tag.de/u/Funky-t)
#### Post date: [August 13, 2009, 9:34am UTC](https://community.mp3tag.de/t/adding-leading-zeros-to-an-extended-field/8769/1 "2009-08-13T09:34:16Z")

</div>

Hi all

I use the initialkey tag for track key information. The value consists of a digit and a letter ie. 1A, 2B, 10A, 12B etc.  
I wish to add a leading zero to single digit values ie. 01A, 02B, 10A, 12B. How can I do that?

Also, I wish to copy the value from initialkey to the contentgroup tag (as iTunes cannot show initialkey and other dj software uses the initialkey, so I need both). How can I do that?

Thanks in advance!

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [August 13, 2009, 3:45pm UTC](https://community.mp3tag.de/t/adding-leading-zeros-to-an-extended-field/8769/2 "2009-08-13T15:45:51Z")

</div>

Make a [new action](https://community.mp3tag.de/t/967/1)

1. 

_Action type:_ **Replace with regular expressions**  
_Field:_ **INITIALKEY**  
_Regular expression:_ **^(\d[^\d])**  
_Replace matches with:_ **0$1**

1. 

_Action type:_ **Format value**  
_Field:_ **CONTENTGROUP**  
_Format string:_ **%INITIALKEY%**

---

<div class="post-metadata">

### Author: ![Funky-t](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/d2c977/32.png) [@Funky-t](https://community.mp3tag.de/u/Funky-t)
#### Post date: [August 13, 2009, 5:22pm UTC](https://community.mp3tag.de/t/adding-leading-zeros-to-an-extended-field/8769/3 "2009-08-13T17:22:51Z")

</div>

That does the trick, thank you very much!

Another issue, some values are like "1A or 1B", is it possible to make a regex that matches both digits?

---

<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/adding-leading-zeros-to-an-extended-field/8769/4 "2026-02-09T12:21:42Z")

</div>


