Copy part of %_TAG% to %composer%?

This is a 2 parter.

Background:

I've got an action that replaces (featuring|feat|ft) with "Featuring:"

Question 1:
the part I'm having trouble with is the second step of this action, which is currently this: (.+)(\WFeaturing: (.+)\W).

so the first capture group is everything before (featuring), the second is "featuring" itself (including the parentheses), and the 3rd is a sub-group of group 2 that captures everything inside the parentheses

That only works if there are parentheses, How do I set it up to work when there aren't? Will I just have to have two scripts, or is there something like an if else loop like in C?

Question 2:

How do I use the "Replace matches with" section in the replace with regex action?

I've tried using: (%_TAG%,$1) featuring: (%composer%,$3) and many other variants but none of them work.

It's a bit hard to follow without before and after examples. I'm also wondering if there are parens that need to be escaped. Do you really need to be concerned with all that comes before and after the capture and replace? RegEx does not have to work on the entire string. I can't make any sense out of your last sentence.

Yeah, I was worried I'd be hard to follow.

"RegEx does not have to work on the entire string." I didn't know that, that's an amazing point though thanks!

So my remaining question is how do I use the replace with regex action to move the captured part of the string to another tag?

If I have string: Pop That (Featuring: Rick Ross, Drake, and Lil' Wayne)

and my regex captures just the "Rick Ross, Drake, and Lil' Wayne" part, what do I put in the Replace Matches With section?

When you are moving from one field to another, you need to use Format Value and the $regexp() function which should look something like this:

Field:
TARGETFIELD

Format string;
$regexp(%sourcefield%,\W(featuring: (.*)),$1)

I'm still not sure exactly what you want, but this may be a starting point.

If you want to move data from one field to another, use the "Import tag" action (guess value).

In the twelve years I've been using Mp3tag, I've never used "Guess Values." I believe because it violates the action convention of TARGETFIELD from %sourcefield% and doesn't appear to be well documented. Does it just do nothing if the guessing pattern isn't found? Would the action be:

Source format:
%title%

Guessing pattern:
%title% (featuring: %composer%)

Yes, it only imports data that matches.
"Guess values" is the extended version of the Convert>Filename-Tag function which is limited to the filename as source...

The pattern shows the correct syntax - but as I do not know what the original data looks like, it is just "guess work" ;-).

Yes and %_TAG% is particularly cryptic, since it doesn't exist. The OP will have to export the data with actual field names for us to make any sense of it.