I see what's happening. First, I thought I'd read through the page fairly carefully but now I see
https://wiki.lazarus.freepascal.org/RegEx_packages#Change_case_on_replaces and there's no explicit \E as an "end of conversion" marker. It's also got the capability of messing up \n etc., which is unfortunate since I've gone to some trouble to allow the user to tune that to exactly what he wants.
Second, it's defaulting to "non-greedy" which I think is a comparatively recent change (and isn't what Perl etc. does).
Thanks for looking, I think everything makes sense now.
Very slightly later: it's possible to simulate the missing \E provided that the first non-match is non-alpha:
Without conversion:
-- --- CS FFFF0 B8 [Opcode 0xB8]
-- --- CS FFFF1 FF [Immediate low 0x00FF]
-- --- CS FFFF2 FF [Immediate 0xFFFF]
-- --- FFFF0 MOV AX,FFFFH
-- --- CS FFFF3 8E [Opcode 0x8E]
-- --- CS FFFF4 D8 [mod-reg-r/m 0xD8]
-- --- FFFF3 MOV DS,AX
Using this Perl-style rule:
/^(.+?)0x([0-9A-Fa-f]+)(.*)$/${1}0x\L$2\u$3/g
-- --- CS FFFF0 B8 [Opcode 0xb8]
-- --- CS FFFF1 FF [Immediate low 0x00ff]
-- --- CS FFFF2 FF [Immediate 0xffff]
-- --- FFFF0 MOV AX,FFFFH
-- --- CS FFFF3 8E [Opcode 0x8e]
-- --- CS FFFF4 D8 [mod-reg-r/m 0xd8]
-- --- FFFF3 MOV DS,AX
All of the output there is rule-generated, with the final detail of formatting handled by that regex.
I think that's good enough :-)
MarkMLl