The preview of the replacement to be made by the following
regex does not match what is actually replaced.
Original text: Document Number=(POL|PRO) [0-9]+\.([0-9]+) Replacement text: $2
The original texts are of the form:
Document Number=POL 1.23 Document Number=PRO 23.5 Document Number=PRO 2.9
and so on. The idea is to be left with:
Document Number=23 Document Number=5 Document Number=9
i.e. strip what are actually document types and manual section
numbers, and leave only what's after the dot. The regex I gave
above, when previewed with these original values, only highlights:
Document Number=POL 1.2 Document Number=PRO 23.5 Document Number=PRO 2.9
That is, it is not being greedy about the numbers after the dot,
but it is being so with the numbers before it. I tried removing
the nongreedy-ing 'U' in
$targetStr = "/$target/U";
in SpecialReplaceText.php extractContext(), and it correctly highlighted
the whole thing. But I haven't really read though the ramifications
of doing that.
Anyway, the point is that when I actually *run* the replacement
(with unmodified code) the correct, greedy, replacement *is* made!
I hope this all makes sense. :-) Thanks!
Version: REL1_19-branch
Severity: normal