Skip to content

JIT match failure for empty capture group #336

@addisoncrump

Description

@addisoncrump

Discovered by #322.

This seems to be an outright incorrect behaviour in the JIT, and it's not an extreme edge case.

  re> /(1|)b*1/
data> (1|)b*1       
No match
data> (1|)b*1\=no_jit
 0: 1
 1: 

Note that the following cases operate as expected:

  re> /1?a*1/
data> 1
 0: 1
data> 
  re> /(1?)a*1/
data> 1
 0: 1
 1: 
data> 1\=no_jit
 0: 1
 1:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions