Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Produce illegal regexes when passed \b in the inputs #33

Open
dubzzz opened this issue Mar 23, 2021 · 0 comments
Open

Produce illegal regexes when passed \b in the inputs #33

dubzzz opened this issue Mar 23, 2021 · 0 comments

Comments

@dubzzz
Copy link

dubzzz commented Mar 23, 2021

Hello,

While running some property based tests against the library, see commit or runkit, I found a bug causing a crash of regexgen when we pass some very precise strings to it.

Indeed if you try to run this code locally (at least with 1.3.0), you'll have a crash at runtime:

regexgen(["\b "," "])
// SyntaxError: Invalid regular expression: /\b? /: Nothing to repeat

Indeed ? cannot be used right after \b but it should be ok with [\b]?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant