It is not allowed to use a function in the replacement part of the function $regexp.
You have to apply regex syntax.
Search the Mp3tag Forums contributions, it has been said already.
It is not necessary, for every new questioner, to reinvent the wheel.
A search in the Mp3tag Forums contributions provides all answer.
But it is nice to see that you have simplified one of the given regular expressions even further.
I have created a Mp3tag mte export script, which visualizes the results of four attempts using regular expressions, which are able to upcase Roman Numerals in different quality.
The output from this profiling test can help to decide, what will the best for this case or for the other case.
To run the "Export.TXT.20150211.Test.RomanNum.Upcase.3.mte" export script, ...
there has to be selected only one file, which is totally not important.
20150211.Test.RomanNum.Upcase.zip (2.45 KB)
See also ...
Roman Numerals
DD.20141120.0847.CET, DD.20150211.1353.CET
20150211.Test.RomanNum.Upcase.zip (2.45 KB)