Hi,
So, after updating gnulib, some test cases in
augeas(https://github.com/hercules-team/augeas) related to regex started
to fail.
I found a commit in gnulib that introduced this behavior:
70b673eb768eb7288639cbbe4642c2912b7d204e
I simplified the bug case to the following:
/re_syntax_options = RE_NO_BK_PARENS;
pattern = "(.*+)";//
//text = "EXAMPLE";/
And here is what I get in the regs after I run re_match:
/match result: 'EXAMPLE'
regs[0]='EXAMPLE'(0,7)
regs[1]='EXAMPLE'(0,-1)
regs[2]=''(-1,-1)/
But in the previous versions (before commit specified earlier) I would get:
/match result: 'EXAMPLE'//
//regs[0]='EXAMPLE'(0,7)//
//regs[1]='EXAMPLE'(0,7)//
//regs[2]=''(-1,-1)/
As you can see, in the first case regs[1] does not point to the first group.
However, everything works fine if I remove a possessive quantifier from
the pattern.
Is this intentional behavior or is it a bug?
Thank you
--
Egor