# Extract / Relocate Substring In ID3 Tags

**URL:** <https://community.mp3tag.de/t/extract-relocate-substring-in-id3-tags/49610>\
**Category:** Support\
**Created:** [July 14, 2020, 11:05am UTC](https://community.mp3tag.de/t/extract-relocate-substring-in-id3-tags/49610 "2020-07-14T11:05:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamyou](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/i/c68b51/32.png) [@iamyou](https://community.mp3tag.de/u/iamyou)\
**Post date:** [July 14, 2020, 11:05am UTC](https://community.mp3tag.de/t/extract-relocate-substring-in-id3-tags/49610/1 "2020-07-14T11:05:25Z")

</div>

I know this is a simple exercise, but I've hit a mental block 😔

I want to move parts of a ID3 tag, into different parts.

* * *

Input:  
Comment: Motown Records -- MTWN45

Output:  
Publisher: Motown Records  
Catalog #: MTWN45

* * *

Basically, I want to work out the logic of moving strings from a tag, into different tags.  
This could be KEY and BPM information in the `%comments%`, but more importantly, in my case `%Publisher%` and `%catalog #%` .

I can then also then do the reverse, e.g. move KEY and BPM information into `%comments%` like this: KEY - BPM , etc.

There is usually a double minus/hyphen or on rare occassions, triple minus/hyphen separator, e.g

- ABC XYZ -- xxx45
- ABC LMNOP --- xxx1234

I tried ACTION - GUESS Value  
Source: $regexp(%comment%,'.\*(?= -- )',$1)  
Guessing: %publisher%

Source: $regexp(%comment%,'(?\<= -- ).\*',$1)  
Guessing: %catalog #%

but this giving me some weird results.

---

<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 14, 2020, 11:10am UTC](https://community.mp3tag.de/t/extract-relocate-substring-in-id3-tags/49610/2 "2020-07-14T11:10:06Z")

</div>

> [@iamyou](#):
>
> There is usually a double minus/hyphen or on rare occassions, triple minus/hyphen separator

Try an action of the type "Guess value"  
Source: %comment%  
Guessing: %publisher% -- %catalog#%

This action leaves the data as it is in COMMENT but fills the 2 additional fields.  
You may have to clear the COMMENT field afterwards.

I would recommend either a filter or a unifying action to get the variation down to

> [@iamyou](#):
>
> a double minus/hyphen

---

<div class="post-metadata">

**Author:** ![iamyou](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/i/c68b51/32.png) [@iamyou](https://community.mp3tag.de/u/iamyou)\
**Post date:** [July 14, 2020, 11:12am UTC](https://community.mp3tag.de/t/extract-relocate-substring-in-id3-tags/49610/3 "2020-07-14T11:12:30Z")

</div>

> [@ohrenkino](#):
>
> Try an action of the type "Guess value"  
> Source: %comment%  
> Guessing: %publisher% -- %catalog#%

^ I tried this exactly, before I made the post.  
It did not work.  
I did not mention this, because it was the most obvious thing to try ... and I'm learning some tricks,...but sorry, it did not work 😪

---

<div class="post-metadata">

**Author:** ![iamyou](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/i/c68b51/32.png) [@iamyou](https://community.mp3tag.de/u/iamyou)\
**Post date:** [July 14, 2020, 11:14am UTC](https://community.mp3tag.de/t/extract-relocate-substring-in-id3-tags/49610/4 "2020-07-14T11:14:23Z")

</div>

sorry.... it does work !  
I was hitting some blank space character, and it was not matching.  
Let me try a few more times....

---

<div class="post-metadata">

**Author:** ![iamyou](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/i/c68b51/32.png) [@iamyou](https://community.mp3tag.de/u/iamyou)\
**Post date:** [July 14, 2020, 11:17am UTC](https://community.mp3tag.de/t/extract-relocate-substring-in-id3-tags/49610/5 "2020-07-14T11:17:24Z")

</div>

> [@ohrenkino](#):
>
> Try an action of the type "Guess value"  
> Source: %comment%  
> Guessing: %publisher% -- %catalog#%

^ this works.  
Bravo, ohrenkino 👍

MP3Tag was 'auto-completing' my expressions,  
and inserted a "wrong" string, so my matches were not working.

It was my mistake & I feel embarrassed now.

So, I used 2 x 'Guess Values' in consecutive order, within the same action.  
ie. 1) for picking up "--" matches  
2) for picking up "---" matches

^ This works well

---

<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 14, 2020, 11:23am UTC](https://community.mp3tag.de/t/extract-relocate-substring-in-id3-tags/49610/6 "2020-07-14T11:23:02Z")

</div>

> [@iamyou](#):
>
> So, I used 2 x 'Guess Values' in consecutive order, within the same action

I would have used a simple "Replace" action to replace 3 hyphens with just 2 as this would have unified the contents of the COMMENT field. If I treat that field again, I would have to distinguish the 2 cases again. This would not be necessary if the COMMENT field contents would be unified.

---

<div class="post-metadata">

**Author:** ![iamyou](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/i/c68b51/32.png) [@iamyou](https://community.mp3tag.de/u/iamyou)\
**Post date:** [July 14, 2020, 11:31am UTC](https://community.mp3tag.de/t/extract-relocate-substring-in-id3-tags/49610/7 "2020-07-14T11:31:43Z")

</div>

Yes, I am aware of this.  
I am just cleaning up some tags now,  
and I will improve my future workflow, to unify some syntax.

I was hitting some 'incorrect characters' before, with the "Guessing Values",  
so that's why I kept failing....and I am embarrassed by it 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:28pm UTC](https://community.mp3tag.de/t/extract-relocate-substring-in-id3-tags/49610/8 "2026-02-09T12:28:43Z")

</div>


