# Extract catalogue number from album field

**URL:** https://community.mp3tag.de/t/extract-catalogue-number-from-album-field/45099
**Category:** Support
**Created:** [April 10, 2019, 9:41pm UTC](https://community.mp3tag.de/t/extract-catalogue-number-from-album-field/45099 "2019-04-10T21:41:08Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![brains](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@brains](https://community.mp3tag.de/u/brains)
#### Post date: [April 11, 2019, 9:44am UTC](https://community.mp3tag.de/t/extract-catalogue-number-from-album-field/45099/5 "2019-04-11T09:44:51Z")

</div>

> [@Regular Expressions](https://community.mp3tag.de/t/regular-expressions/521/66):
>
> [BT 03] - 1995 - Spikey Trance

Ah, actually i don't think that is what im trying to do. Right now, the album field already says all of this " [BT 03] - 1995 - Spikey Trance" and the catalog # tag is blank. I want catalog # to say "BT 03"

My brother suggested maybe first, simply copy album field to catalog #, then use something like

`$regexp(%catalog #%, "^\.*[(.*?)\].*$", $1)`  
on the catalog # field to keep only whats inside the brackets  
and  
`$regexp(%album%, "[(.*?)\] ?", "")`  
on the album field to remove the brackets and everything inside them (as i don't want the catalog number in album field once its copied over to the catalog # field

perhaps that code needs correcting. I don't know if there's a better way

---

_[View the full topic](https://community.mp3tag.de/t/extract-catalogue-number-from-album-field/45099)._
