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

match with regex doesn't set variable correctly when backtracking. #367

Open
adam-antonik opened this issue Jul 16, 2020 · 2 comments
Open
Assignees

Comments

@adam-antonik
Copy link
Contributor

Changing the example from the from the front-page slightly to match "f(o*)obar"

match "foobar" with
| 'f(?<os>o*)obar' -> os
| _               -> "???"

will evaluate to "oo", not "o". Similarly, if we use 'f(?.*)bar', then os = "oobar".

@kthielen kthielen self-assigned this Jul 16, 2020
@kthielen
Copy link
Contributor

Good catch, I will take a look.

@kthielen
Copy link
Contributor

Sorry adam, lots going on, I'm no longer part of the project or Morgan Stanley, can't submit a change anymore. I might be able to get a fix into my fork but have some other issues to take care of first.

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

2 participants