# Regexp from one column appended to another

**URL:** https://community.mp3tag.de/t/regexp-from-one-column-appended-to-another/19467
**Category:** Support
**Created:** [October 23, 2017, 11:45am UTC](https://community.mp3tag.de/t/regexp-from-one-column-appended-to-another/19467 "2017-10-23T11:45:44Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Hyperion](https://community.mp3tag.de/user_avatar/community.mp3tag.de/hyperion/32/493_2.png) [@Hyperion](https://community.mp3tag.de/u/Hyperion)
#### Post date: [October 23, 2017, 11:45am UTC](https://community.mp3tag.de/t/regexp-from-one-column-appended-to-another/19467/1 "2017-10-23T11:45:44Z")

</div>

I have a series of albums with the version of the CD release they're ripped from, stated in the album field after the album name, in square brackets. I would like to move that away from the album column but still preserve it, ideally at the end of comments, where I already have some information stored. I've tried fiddling with regular expression and formatting actions but solution to the first step still elude me- I can't find out how to extract the CD version from the album, perhaps into a temporary new column. It should always start with **[CD** and end with **]**, so that it won't pick up things like the **[Live]**

This image should help with explaining it. Sorry for the Czech column titles, even although my OS and Mp3tag language is set to English, the program still somehow picks my native language for column names...

 ![](https://i.imgur.com/oyx6OtZ.png)

---

<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: [October 23, 2017, 2:01pm UTC](https://community.mp3tag.de/t/regexp-from-one-column-appended-to-another/19467/2 "2017-10-23T14:01:28Z")

</div>

> [@Hyperion](#):
>
> ...  
> This image should help with explaining it. Sorry for the Czech column titles, even although my OS and Mp3tag language is set to English, the program still somehow picks my native language for column names...

see this thread on the language issue (which isn't one): [/t/19284/1](https://community.mp3tag.de/t/19284/1)

To fill the comment, create an action group with 2 actions:  
No. 1:  
Action of the type "Format value" for COMMENT  
Format string: %title%  
(This copies the contents of TITLE into COMMENT)  
No. 2:  
Action of the type "Format value" for COMMENT  
Format string: $regexp(%comment%,'._([._])',$1)

---

<div class="post-metadata">

### Author: ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)
#### Post date: [October 23, 2017, 3:18pm UTC](https://community.mp3tag.de/t/regexp-from-one-column-appended-to-another/19467/3 "2017-10-23T15:18:12Z")

</div>

Define an action group with 4 actions:

1. Action  
Type: Guess Values  
Source Format: %album%  
Guessing Pattern: %dummy% [CD %CD\_Version%

2. Action  
Type: Format Value  
Field: %comment%  
Format String: %comment%; CD %CD\_Version%

3. Action  
Type: Guess Values  
Source Format: %album%  
Guessing Pattern: %album% [CD %dummy%

4. Action  
Type: Format Value  
Field: %CD\_Version%  
Format String: (empty to delete this temporary field)

"Don't try this at home" - aka test this with duplicates of your files before using it for the originals. 😉

---

<div class="post-metadata">

### Author: ![Hyperion](https://community.mp3tag.de/user_avatar/community.mp3tag.de/hyperion/32/493_2.png) [@Hyperion](https://community.mp3tag.de/u/Hyperion)
#### Post date: [October 23, 2017, 4:06pm UTC](https://community.mp3tag.de/t/regexp-from-one-column-appended-to-another/19467/4 "2017-10-23T16:06:37Z")

</div>

> [@ohrenkino](#):
>
> see this thread on the language issue (which isn't one): [/t/19284/1](https://community.mp3tag.de/t/19284/1)

Thanks, through that I found the two files where the column names are stored (columns.ini and usrfields.ini) and manually renamed them all to English. No need to delete them and lose all the preferences 🙂

> [@poster](#):
>
> Define an action group with 4 actions:
> 
> 1. Action  
> Type: Guess Values  
> Source Format: %album%  
> Guessing Pattern: %dummy% [CD %CD\_Version%
> 
> 2. Action  
> Type: Format Value  
> Field: %comment%  
> Format String: %comment%; CD %CD\_Version%
> 
> 3. Action  
> Type: Guess Values  
> Source Format: %album%  
> Guessing Pattern: %album% [CD %dummy%
> 
> 4. Action  
> Type: Format Value  
> Field: %CD\_Version%  
> Format String: (empty to delete this temporary field)
> 
> "Don't try this at home" - aka test this with duplicates of your files before using it for the originals. 😉

Thanks a lot, with a few modifications I finally got the desired result! This is what I changed / added:

1. Format String: %comment% CD %CD\_Version% _(I just didn't want the colon in there)_

2. Type: Remove frields, Field: CD\_VERSION _(Empty field in format value was preventing me from pressing OK in the action definition)_

3. added regular expression to add the "[" to the beginning of the CD version in comment, needed as a new action since putting [ into format value was throwing exception errors.  
Field: COMMENT  
Regexp: CD  
Replace matches with: [CD

Also, thanks ohrenkino for the regexp idea, which I used in the additional action 🙂

---

<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:27pm UTC](https://community.mp3tag.de/t/regexp-from-one-column-appended-to-another/19467/5 "2026-02-09T12:27:04Z")

</div>


