lpil/rustexp

Combining Non-capturing groups and alternation causes a panic

Open

#11 opened on Apr 4, 2020

View on GitHub
 (0 comments) (0 reactions) (0 assignees)Rust (21 forks)github user discovery
bughelp wanted

Repository metrics

Stars
 (130 stars)
PR merge metrics
 (PR metrics pending)

Description

If I enter in the following regex and subject then the capture list on the right doesn't update and the javascript console reports a panic: Regex:

(?:a(b+)c)|(b+)d

Subject:

abc
bbd

This same regex and subject work as expected in the rust playground.

Either of (?:a(b+)c) or (b+)d work as expected in rustexp, and (?:a(b+)c)(b+)d even works too.

Contributor guide