How to replace part of a string with a value from another tag?

I'd like to replace part of a string (first 4 chars) from RELEASETIME with the full value of YEAR

For example:
ReleaseTime: 2007-08-27T22:00:00Z
Year: 2024

Result: 2024-08-27T22:00:00Z

I've tried creating a "Replace with regular expression" where:
field: RELEASETIME
reg ex: ^.{0,4}

but there I can't see a way to use the value from field YEAR as a replacement.

You could try
Convert Tag -> Tag

Field:
RELEASETIME
Format string:
$regexp(%RELEASETIME%,\d{4},%YEAR%)

This would replace the first 4 digits in RELEASETIME with the content of YEAR.

Works perfectly - thanks!