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

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

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

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

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

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.

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

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. :relieved: