# Splitting a tag into 2 and copying one part to another tag

**URL:** <https://community.mp3tag.de/t/splitting-a-tag-into-2-and-copying-one-part-to-another-tag/50855>\
**Category:** Support\
**Created:** [November 20, 2020, 8:47pm UTC](https://community.mp3tag.de/t/splitting-a-tag-into-2-and-copying-one-part-to-another-tag/50855 "2020-11-20T20:47:26Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kuchlei](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/8dc957/32.png) [@Kuchlei](https://community.mp3tag.de/u/Kuchlei)\
**Post date:** [November 20, 2020, 8:47pm UTC](https://community.mp3tag.de/t/splitting-a-tag-into-2-and-copying-one-part-to-another-tag/50855/1 "2020-11-20T20:47:26Z")

</div>

Hello,  
I know your first reactions are going to be "Read the FAQ" the answers are there. I have looked, cut and pasted the solutions, changed the tag names etc to my purposes and tested several of the solutions and non worked for me.. Now I assume it is because I am doing something wrong when I try to create the actions or I don't understand the syntax.

I have items in the %artist% tag in the format where the group lead is followed by a " & " followed by the group name. i.e. Bob Marley & The Wailers. What I want to do is copy everything before the " & " to the %albumartist% tag but only if the artist album is blank.. Since none of the examples I found worked for me I tried this:  
Field: ALBUMARTIST  
Regular expression: %artist% HAS " & " AND %albumartist% IS "" (this works in the filter)  
Replace matches with: $LEFT(%artist%,$LEN(%artist%) - $STRCHAR(%artist%," & ")).

When I click on the Action I see this:Regular expression "ALBUMARTIST":"%artist% HAS " & " AND %albumartist% IS "" -\> "$LEFT(%artist%,$LEN(%artist%) - $STRCHAR(%artist%," & "))"

This kind of logic works in many languages and there seem to be the correct scripting functions to do this but so far I have not been able to make it work.

Am I way of base with my expectations of the scripting language or is my syntax wrong???

Help please

---

<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:** [November 20, 2020, 8:51pm UTC](https://community.mp3tag.de/t/splitting-a-tag-into-2-and-copying-one-part-to-another-tag/50855/2 "2020-11-20T20:51:53Z")

</div>

> [@Kuchlei](#):
>
> but only if the artist album is blank

I would filter for the files that do not have a filled ALBUMARTIST with  
ALBUMARTIST MISSING  
This also reduces the number of rewritten files.  
Then try an action of the type "Guess value"  
Source: `%artist%`  
Target string: `%albumartist% & %artist%`

---

<div class="post-metadata">

**Author:** ![Kuchlei](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/8dc957/32.png) [@Kuchlei](https://community.mp3tag.de/u/Kuchlei)\
**Post date:** [November 20, 2020, 9:14pm UTC](https://community.mp3tag.de/t/splitting-a-tag-into-2-and-copying-one-part-to-another-tag/50855/3 "2020-11-20T21:14:51Z")

</div>

Nope, That did nothing but propagate the Artist to the albumartist . Guess I will just do it manually.

---

<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:** [November 20, 2020, 9:18pm UTC](https://community.mp3tag.de/t/splitting-a-tag-into-2-and-copying-one-part-to-another-tag/50855/4 "2020-11-20T21:18:25Z")

</div>

What kind of action did you use?  
If the pattern does not match then usually nothing happens. So the result is not really plausible

---

<div class="post-metadata">

**Author:** ![Kuchlei](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/8dc957/32.png) [@Kuchlei](https://community.mp3tag.de/u/Kuchlei)\
**Post date:** [November 20, 2020, 9:28pm UTC](https://community.mp3tag.de/t/splitting-a-tag-into-2-and-copying-one-part-to-another-tag/50855/5 "2020-11-20T21:28:16Z")

</div>

I Used Guess values. The source exactly as you posted and the Target string exactly as you posted. That just copied from artist to album artist. Since the & has a space on each side I also tried " & " in the target string but that did nothing.

---

<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:** [November 20, 2020, 9:30pm UTC](https://community.mp3tag.de/t/splitting-a-tag-into-2-and-copying-one-part-to-another-tag/50855/6 "2020-11-20T21:30:41Z")

</div>

Then perhaps a screendump would help - with a visible source field and the action

---

<div class="post-metadata">

**Author:** ![Kuchlei](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/8dc957/32.png) [@Kuchlei](https://community.mp3tag.de/u/Kuchlei)\
**Post date:** [November 20, 2020, 9:35pm UTC](https://community.mp3tag.de/t/splitting-a-tag-into-2-and-copying-one-part-to-another-tag/50855/7 "2020-11-20T21:35:32Z")

</div>

To be honest I've spent more time on this than it would have taken to do this manually, which is what I am going to do. Thanks for your help anyway. Once I'm done I won't need to do this again. 😌

---

<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/splitting-a-tag-into-2-and-copying-one-part-to-another-tag/50855/8 "2026-02-09T12:28:56Z")

</div>


