# Searching within parentheses and moving only the numbers

**URL:** https://community.mp3tag.de/t/searching-within-parentheses-and-moving-only-the-numbers/11822
**Category:** Support
**Created:** [April 6, 2011, 2:10pm UTC](https://community.mp3tag.de/t/searching-within-parentheses-and-moving-only-the-numbers/11822 "2011-04-06T14:10:09Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![kittmaster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kittmaster/32/14793_2.png) [@kittmaster](https://community.mp3tag.de/u/kittmaster)
#### Post date: [April 6, 2011, 2:10pm UTC](https://community.mp3tag.de/t/searching-within-parentheses-and-moving-only-the-numbers/11822/1 "2011-04-06T14:10:09Z")

</div>

I want to move the BPM numbers only to the BPM field from the file title tag.

I know that \s((.\*)) will remove all inside and the parentheses also.

I can't seem to figure out how to search within and only move the numerical data to the bpm field without the text. Since one file has 3 digits and the other 2, I'm not sure how to do this.

Below are two examples:

Horse & Carriage (feat. Mase) (100 bpm)

Woo Hah! (96 bpm)

Can someone help me figure out how to do this?

Thanks!

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [April 6, 2011, 2:37pm UTC](https://community.mp3tag.de/t/searching-within-parentheses-and-moving-only-the-numbers/11822/2 "2011-04-06T14:37:58Z")

</div>

This give you the numbers only:  
$regexp(%title%,.+((\d+) bpm),$1,1)

And this the rest of the title without the parentheses:  
$regexp(%title%,(.+) (\d+ bpm),$1,1)

If you want to format both fields in one go:

Action: Guess Values  
Sourceformat: $regexp(%title%,(.+) ((\d+) bpm),$1+++$2,1)  
Guessingpattern: %title%+++%bpm%

---

<div class="post-metadata">

### Author: ![kittmaster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kittmaster/32/14793_2.png) [@kittmaster](https://community.mp3tag.de/u/kittmaster)
#### Post date: [April 6, 2011, 2:50pm UTC](https://community.mp3tag.de/t/searching-within-parentheses-and-moving-only-the-numbers/11822/3 "2011-04-06T14:50:19Z")

</div>

oh my.....

brilliant and exactly what I was looking for.

I used it as the action, it puts the numbers into the field and nuke it off the title cleanly.

Thank you very much. I will try to understand the script a bit better. I understand the %% operators, the \d operator, and the $ operator, just not the contruction of the syntax to execute the task.

But it is certainly what I needed!

Excellent.....🙂

---

<div class="post-metadata">

### Author: ![kittmaster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kittmaster/32/14793_2.png) [@kittmaster](https://community.mp3tag.de/u/kittmaster)
#### Post date: [April 6, 2011, 3:06pm UTC](https://community.mp3tag.de/t/searching-within-parentheses-and-moving-only-the-numbers/11822/4 "2011-04-06T15:06:47Z")

</div>

Ok and to add a monkey wrench I have the same issue with different format:

Mama Said Knock You Out-102

Always On Time-97

Tried to adjust source format to:

$regexp(%title%,(.+) ((\d+)-),$1+++$2,1)

and

$regexp(%title%,(.+) (\d+)-,$1+++$2,1)

but neither worked, I guess I still don't understand enough about the script action.

What am I missing?

☹

Thanks

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [April 6, 2011, 4:01pm UTC](https://community.mp3tag.de/t/searching-within-parentheses-and-moving-only-the-numbers/11822/5 "2011-04-06T16:01:36Z")

</div>

> [@kittmaster](#):
>
> Ok and to add a monkey wrench I have the same issue with different format:
> 
> Mama Said Knock You Out-102
> 
> Always On Time-97
> 
> Tried to adjust source format to:
> 
> $regexp(%title%,(.+) ((\d+)-),$1+++$2,1)
> 
> and
> 
> $regexp(%title%,(.+) (\d+)-,$1+++$2,1)
> 
> What am I missing?

$regexp(%title%,(.+)-(\d+),$1+++$2,1)

I don't know what you are missing. Both of your strings still have the litteral parentheses (or parts of them) in in them ( and ).  
They are not needed here.  
And you write -(\d+) but in the examples it's -102 and -97 . With the minus on the left side of the digits.

---

<div class="post-metadata">

### Author: ![kittmaster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kittmaster/32/14793_2.png) [@kittmaster](https://community.mp3tag.de/u/kittmaster)
#### Post date: [April 6, 2011, 5:26pm UTC](https://community.mp3tag.de/t/searching-within-parentheses-and-moving-only-the-numbers/11822/6 "2011-04-06T17:26:32Z")

</div>

> [@pone](#):
>
> $regexp(%title%,(.+)-(\d+),$1+++$2,1)
> 
> I don't know what you are missing. Both of your strings still have the litteral parentheses (or parts of them) in in them ( and ).  
> They are not needed here.  
> And you write -(\d+) but in the examples it's -102 and -97 . With the minus on the left side of the digits.

Your right, that is my lack of knowledge of that area, I was trying to see if I could figure out what to do to fix it without the knowledge of the consequence of the actions I was doing.

I've learned a lot, hopefully this will add to that knowledge base. It works the way I need it, thank you once again!

---

<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:23pm UTC](https://community.mp3tag.de/t/searching-within-parentheses-and-moving-only-the-numbers/11822/7 "2026-02-09T12:23:01Z")

</div>


