# Digit Following A Parentesis?

**URL:** https://community.mp3tag.de/t/digit-following-a-parentesis/9367
**Category:** Support
**Created:** [November 18, 2009, 10:20pm UTC](https://community.mp3tag.de/t/digit-following-a-parentesis/9367 "2009-11-18T22:20:08Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![juggernaut](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/d07c76/32.png) [@juggernaut](https://community.mp3tag.de/u/juggernaut)
#### Post date: [November 18, 2009, 10:20pm UTC](https://community.mp3tag.de/t/digit-following-a-parentesis/9367/1 "2009-11-18T22:20:08Z")

</div>

Hi,

I can't seem to find a way of having a digit following a parentheses when replacing text. For example I want to use:

$11

I've put them in different colours to show that it should be parentheses number 1 followed by the digit 1. But it is of course parsing it as parentheses 11 instead and I cannot seem to find a way around it.

Thanks for any help.  
Jug.

edit: I see a workaround to this is to use an invalid character in-between which it naturally emits. I personally don't find that a very _pretty_ method though.

---

<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: [November 19, 2009, 6:57am UTC](https://community.mp3tag.de/t/digit-following-a-parentesis/9367/2 "2009-11-19T06:57:06Z")

</div>

I do not understand what the problem is and what you want to tell us about this problem.  
Please elaborate the problem in other words and give us a real world example of the circumstances.

DD.20091119.0856.CET

---

<div class="post-metadata">

### Author: ![MatthiasM](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@MatthiasM](https://community.mp3tag.de/u/MatthiasM)
#### Post date: [November 19, 2009, 8:10am UTC](https://community.mp3tag.de/t/digit-following-a-parentesis/9367/3 "2009-11-19T08:10:52Z")

</div>

I assume he wants to use a "replacement number" directly followed by a digit in a regular expression.  
e.g. like this:

```
$regexp(%_FILENAME%,'(abc)(3)',$10$2)

```

In his case this should lead to "abc03", but leads to "3" because the $1 **0** will not be interpreted as "$1" followed by a "0" but interpreted as "$10" (tenth parenthesis expression) - which does not exist.

The solution is easy:  
use a brace "{" around the "parenthesis number":

```
$regexp(%_FILENAME%,'(abc)(3)',${1}0$2)

```

kind regards,  
Matthias

---

<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: [November 19, 2009, 8:23am UTC](https://community.mp3tag.de/t/digit-following-a-parentesis/9367/4 "2009-11-19T08:23:22Z")

</div>

This seems to work too ...

$regexp('abc3','(abc)(3)','\10\2')

... which gives "abc03"

DD.20091119.1023.CET

---

<div class="post-metadata">

### Author: ![MatthiasM](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@MatthiasM](https://community.mp3tag.de/u/MatthiasM)
#### Post date: [November 19, 2009, 8:43am UTC](https://community.mp3tag.de/t/digit-following-a-parentesis/9367/5 "2009-11-19T08:43:36Z")

</div>

> [@DetlevD](#):
>
> This seems to work too ...
> 
> $regexp('abc3','(abc)(3)','\10\2')

Interesting 😉  
I assume this works because the underlying regex-library does only support 9 backreferences when using "\1" syntax and more of them when using "$1" syntax.

BTW, which regex-library does mp3tag use?

An interesting page about regex in common and different implementations is this one:  
[www.regular-expressions.info/refreplace.html](http://www.regular-expressions.info/refreplace.html)  
Really good page!

kind regards,  
Matthias

---

<div class="post-metadata">

### Author: ![juggernaut](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/d07c76/32.png) [@juggernaut](https://community.mp3tag.de/u/juggernaut)
#### Post date: [November 19, 2009, 9:32am UTC](https://community.mp3tag.de/t/digit-following-a-parentesis/9367/6 "2009-11-19T09:32:45Z")

</div>

Ah thanks I will change to the suggested ${1}1 as that seems like better syntax.

---

<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/digit-following-a-parentesis/9367/7 "2026-02-09T12:21:57Z")

</div>


