Capture groups with zero repetition and search_slots behavior #1326
-
|
Hello, quick question. I am working on adding support for subroutine calls to the fancy-regex crate, which delegates to regex-automata to do the heavy lifting. fancy-regex aims to support Oniguruma syntax. Oniguruma doesn't support defining subroutines using conditional syntax, so it is common to define subroutines as capture groups with zero-repetition, such that the capture group is not executed immediately, and only invoked via subroutine call. i.e. Now the problem I have comes when using It seems like in general, regex-automata doesn't mind when the Vec has room for more slots than is required - except when the pattern contains this zero-repetition capture group... As can be seen in the Rust Playground link above, it panics... So my question is: is it expected, or is it a bug?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
This looks like a bug yeah. |
Beta Was this translation helpful? Give feedback.
This looks like a bug yeah.