# Regex backreferences

**URL:** https://community.mp3tag.de/t/regex-backreferences/11226
**Category:** Support
**Created:** [December 2, 2010, 9:40pm UTC](https://community.mp3tag.de/t/regex-backreferences/11226 "2010-12-02T21:40:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![FiveString](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/ec9cab/32.png) [@FiveString](https://community.mp3tag.de/u/FiveString)
#### Post date: [December 2, 2010, 9:40pm UTC](https://community.mp3tag.de/t/regex-backreferences/11226/1 "2010-12-02T21:40:28Z")

</div>

I encountered a case where I had a regex that matched two single digits (\d)(\d) and in the replacement I wanted to embed a zero between them. This proved challenging because $10$2 is presumably being interpreted as field 10 followed by field 2 rather than as 1, zero, 2. I tried escaping the zero every way I could think of as well as putting parens around the $1 and $2. No luck.

Ultimately I solved the problem by using $1$num($2,2) but that only works in this particular case because it's a zero I want to embed.

So how would I have done this if I wanted, say, a 1 between the two previously matched digits?

---

<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: [December 2, 2010, 10:17pm UTC](https://community.mp3tag.de/t/regex-backreferences/11226/2 "2010-12-02T22:17:06Z")

</div>

I found  
${1}0$2  
or  
\10$2

---

<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:22pm UTC](https://community.mp3tag.de/t/regex-backreferences/11226/3 "2026-02-09T12:22:44Z")

</div>


