Bug #3162
closedIncorrect captured groups in fn:analyze-string
100%
Description
See https://saxonica.plan.io/boards/3/topics/6720?r=6722
The repro has been added to QT3 as test analyzeString-029.
Updated by Michael Kay over 7 years ago
- Status changed from New to Resolved
- Fix Committed on Branch 9.7, 9.8 added
I have initially implemented a fairly modest fix, to minimize risk. The change is that OpSequence (which implements a regular expression corresponding to a sequence of subexpressions (a) knows statically whether it contains any capturing subexpressions, and (b) if so, when it starts matching, it takes a copy of the state of the matcher (specifically the current captured groups), and if the sequence as a whole does not match, then it resets the state to the original.
I will experiment with improvements to this solution on the 9.8 branch. For example, I think we can improve the data structure for holding this state information.
Updated by O'Neil Delpratt over 7 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.7.0.18 added
Bug fix applied in the Saxon 9.7.0.18 maintenance release.
Updated by O'Neil Delpratt over 7 years ago
- Fix Committed on Branch trunk added
- Fix Committed on Branch deleted (
9.8)
Please register to edit this issue