# reverse logic?

**URL:** <https://community.mp3tag.de/t/reverse-logic/15951>\
**Category:** Support\
**Created:** [July 29, 2014, 11:55am UTC](https://community.mp3tag.de/t/reverse-logic/15951 "2014-07-29T11:55:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ForSSound](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/258eb7/32.png) [@ForSSound](https://community.mp3tag.de/u/ForSSound)\
**Post date:** [July 29, 2014, 11:55am UTC](https://community.mp3tag.de/t/reverse-logic/15951/1 "2014-07-29T11:55:13Z")

</div>

Hi There,

I made a Tag-Tag action.

Album="AM013\_Light Speed"  
Album="AMB15\_kara"  
Album="ATMOS2\_French Docs"

Field Discnumber  
$regexp(%Album%,(\u{1,3})(\d{1,4}),$1$2)

The data I want to keep is "AM013" however the result is "AM013\_Light Speed"..

What am I doing wrong?  
Kind Regards  
Guy Forssman

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [July 29, 2014, 1:36pm UTC](https://community.mp3tag.de/t/reverse-logic/15951/2 "2014-07-29T13:36:43Z")

</div>

You left out the bit you don't want.  
$regexp(%Album%,(\u{1,3})(\d{1,4})._,$1$2)  
So, just using  
$regexp(%Album%,(._)\_.\*,$1)

would have been enough if the underscore is the separator.

---

<div class="post-metadata">

**Author:** ![ForSSound](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/258eb7/32.png) [@ForSSound](https://community.mp3tag.de/u/ForSSound)\
**Post date:** [July 30, 2014, 6:57am UTC](https://community.mp3tag.de/t/reverse-logic/15951/3 "2014-07-30T06:57:52Z")

</div>

> [@ohrenkino](#):
>
> You left out the bit you don't want.  
> $regexp(%Album%,(\u{1,3})(\d{1,4})._,$1$2)  
> So, just using  
> $regexp(%Album%,(._)\_.\*,$1)
> 
> would have been enough if the underscore is the separator.

Thank you very much for pointing out my mistake..It works like a charm now

---

<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:25pm UTC](https://community.mp3tag.de/t/reverse-logic/15951/4 "2026-02-09T12:25:10Z")

</div>

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


