So my thought was to build out a string formula to evaluate with a dynamic replace. I thought the first step would be to add the subtractive rules for evaluation in a RegEx.
I needed to union these to the provided roman numerals and equivalents, but as I wanted to evaluate it with a RegEx, I knew I needed to match the subtractive rules first, so I changed the order in the union.
I then built a summary tool to concatenate a string for RegEx evaluation. I did manually copy this string into the RegEx tool after my initial creation with the summary tool. But it should work for other similar formula and roman numeral evaluations. Again the 4, 9, 40, 90, etc would need to be matched first in order to not match the individual patterns (the I & V in 4). That looks like this
After that I had to build a formula to insert parenthetics and plus signs in the formula. It got a bit complex, but I essentially created it step by step, evaluating each as I went.
I'm no expert on the dynamic replace tool, and it takes a bit of configuration to make it work. But ultimately it produced this workflow and evaluated consistent with the solution. Hope someone finds this interesting and or useful. -mp