Extract part of one field and insert into another?

Hello. I have some files with an ID in the filename, for example, "Nocturna [5a78cd3f].mp3". I want to extract the bit between the brackets and insert that into the existing comment field where there is a placeholder. For example, my comment field might be "date=1953.12.06; lg=esp; lyr=n; srcid=ID_GOES_HERE", with ID_GOES_HERE to be replaced by that string from between the brackets in the filename. How can I do that?

More generally, with full dates in the YEAR tag (which some vendors seem do to), could I pull that ID from the filename and the year tag into the comments field in one operation?


Try an action of the type "Format value" for COMMENT
Format string: %comment%; srcid=$regexp(%_filename%,'.*\[(.*)\]',$1)

As regular expressions and other format strings have to be accurate down to the last space character or punctuation, I can only say:
yes, generally, it should be possible, but for an exact suggestion the exact source string is needed.
Also I would like to add that the id3 standard says that YEAR has 4 digits. Anything longer at least breaks the standard and it is not guaranteed that the player can cope with it.
If you have longer dates, then other fields like RELEASETIME would be better.
Looking at

I would think that date looks like RELEASETIME, lg looks like LANGUAGE and ly like UNSYNCEDLYRICS. I would store that data in the dedicated and structured fields and not as an amorphous string in COMMENT.

As you posted initally in the Support section, I assumed that you refer to the Windows version. Is that so or do you use the Mac version?