...or is it a simplified example?
It's a vastly simplified example (what the grumpy StackOverflow people would call "Minimal, Complete, and Verifiable").
My actual regex is this: ((?=\b[MCDXLVI]{1,6}\b)M{0,4}(?:CM|CD|D?C{0,3})(?:XC|XL|L?X{0,3})(?:IX|IV|V?I{0,3}))
(It matches Roman Numerals to the exclusion of other text - using that as the example would just complicate everything!)
btw, are you using "Multiple Search & Replace" to create this ASR preset? function "\@replace" had been created only as backend for MSR. it's better to use MSR (convenient frontend) for such tasks.
I was using ASR (that's the more convenient frontend, isn't it?) - MSR is almost impossible to use as the UI input-fields don't seem to allow simple cursor movement with the <Left>/<Right> keys, so editing is a lost cause. (The ASR input fields work fine, so that's the best one for me. I have no idea why the MSR input is so difficult - maybe I adjusted the keyboard settings in MB and it interferes with your UI?)
In any event, the result is the same for either (I just tried it), so it's something in the function itself, probably not user-error.
To be completely fair, what I'm
really looking for is a function which is the opposite of @lc (I need roman numerals in all upper-case, after using @tc on the rest of the text). There doesn't seem to be an all upper-case function (is there?), so I'm using @replace as an awkward workaround.