Replace with wildcards

I have a list of calculation formulas, how can I replace something like
‘MAX(D99020-15/85*(D99003+D99008), D99020-15/60D99003, 0)’ to
(${D99003}+${D99008}),${D99020}-15/60*${D99003}, 0)’, given that there will be always 5 digits after ‘D’. The calculation will be really random, so my main problem is how can I add a ‘}’ after each of ‘D???’.


Replacing with wildcards is not possible in EasyMorph at this point. However you can split the string into substrings using char D as separator, do replacements and then concatenate it back using Aggregate in Concatenate mode.

text.txt (57 Bytes)
eiffel.morph (3.3 KB)