Copy one term (first term) from filename strings of varying length??

There are actually two separate actions I am trying to accomplish here.

First, I have a long list of music files with the same filename/path format. That is, for example:
"[ANJDEE002] Hawk - Need For Cognition (2005) 320"
"[ANJDEE123R] Dusky feat. Janai - Lost In You (The Remixes) (2011) WEB"

What I am attempting to do is move the label code '[ANJDEE002]' for each file into the 'comment' tag. I can't seem to mask using %1 %2 etc.. because all of the strings are of varying length, so I don't know how many variables to put in place. I also consulted the methods for cutting a certain number of characters out of a string, but I can' figure out how to choose the characters I want to keep as opposed to the ones I want to remove.
Could somebody help me figure out how to accomplish this?

NOTE: I would prefer to come up with a solution that would let me copy the first term as a whole "[ANJDEE002]" out of the string no matter how many characters were in it, since it varies slightly. BUT, if the easiest solution is to simply use a method that cuts the first 'n' characters out of the string, I can work with that.

Second, and this should be relatively easy, can somebody help me complete an action that would allow me to remove the brackets on either side of a one word tag. So if the comment tag contained '[ANJDEE123R]' I would want to convert it to simply 'ANJDEE123R'. It seems that this would probably be easier to separate this part as opposed to doing it in combination with my first action.

Thanks in advance!

These variables are only valid for the Convert>filename-filename function.
If you want to extract data from the filename, use the Convert>Filename-Tag function.

maps e.g. to the following field mask:
[%comment%] %artist% - %title% (%year%) %dummy%

It could be that the second set of parenthesis in the second example has to be treated separately or you only extract the comment:
[%comment%] %dummy%

The import and using the square brackets as separator removes the brackets in one go.