# Use $rexexp() in column?

**URL:** <https://community.mp3tag.de/t/use-rexexp-in-column/17791>\
**Category:** Support\
**Created:** [March 25, 2016, 3:38pm UTC](https://community.mp3tag.de/t/use-rexexp-in-column/17791 "2016-03-25T15:38:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcusj0015](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/43a26b/32.png) [@marcusj0015](https://community.mp3tag.de/u/marcusj0015)\
**Post date:** [March 25, 2016, 3:38pm UTC](https://community.mp3tag.de/t/use-rexexp-in-column/17791/1 "2016-03-25T15:38:52Z")

</div>

I'm trying to remove everything in the %BPM% field (which for example contains "00319 BPM") except "319"

Currently the value field in the bpm column contains "$regexp(%bpm%,([1-9]+),$)" (without the quotes of course)

But it's printing a long error message about the + operator.

---

<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 25, 2016, 4:17pm UTC](https://community.mp3tag.de/t/use-rexexp-in-column/17791/2 "2016-03-25T16:17:20Z")

</div>

"$regexp(%bpm%,[1-9]+,$ **0** )"

But there is still a flaw. You only want to knock out the leading zeros. Don't you?

"$regexp(%bpm%,[1-9][0-9]\*,$0)"

---

<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 25, 2016, 4:27pm UTC](https://community.mp3tag.de/t/use-rexexp-in-column/17791/3 "2016-03-25T16:27:12Z")

</div>

> [@marcusj0015](#):
>
> I'm trying to remove everything in the %BPM% field (which for example contains "00319 BPM") except "319" ...

You do not need a regular expression, a simple standard function can help too ...

**$num('00123 BPM',0) ==\> '123' $num('00120 BPM',0) ==\> '120' $num(%BPM%,0)**

If you want a regular expression ...

**$regexp(%BPM%,'0\*(\d+).\*','$1')**

DD.20160325.1827.CET

---

<div class="post-metadata">

**Author:** ![marcusj0015](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/43a26b/32.png) [@marcusj0015](https://community.mp3tag.de/u/marcusj0015)\
**Post date:** [March 25, 2016, 11:42pm UTC](https://community.mp3tag.de/t/use-rexexp-in-column/17791/4 "2016-03-25T23:42:16Z")

</div>

Thanks @DetlevD the $num() function worked perfectly.

For anyone coming from Google the solution was: $num(%bpm%,)

---

<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/use-rexexp-in-column/17791/5 "2026-02-09T12:26:10Z")

</div>

Closed on February 9, 2026, 12:26pm UTC


