PCRE2Project / pcre2

PCRE2 development is now based here.
Other
919 stars 191 forks source link

Inconsistency with ungreedy unset backrefs #349

Closed addisoncrump closed 11 months ago

addisoncrump commented 12 months ago

I cannot find a version for which the behaviour is consistent, so I assume this bug has been around since the JIT compiler.

  re> /\1+?()/match_unset_backref
data> a
No match
data> a\=no_jit
 0: 
 1: 

In this case I believe the JIT is wrong, as ungreedy here should just be 1 match of empty.

PhilipHazel commented 12 months ago

@zherczeg , this is another one where I think the interpreter's behaviour is the right one.

zherczeg commented 11 months ago

Fixed in 9de4d53cf850e0fca625ce9d80c12bea5b2a5ab9