Extract / Relocate Substring In ID3 Tags

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

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

Comment: Motown Records -- MTWN45

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.

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

^ 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 :sleepy:

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

^ this works.
Bravo, ohrenkino :+1:

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

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.

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.