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

Metavariable-regex is anchored #4807

Closed
nbrahms opened this issue Mar 14, 2022 · 3 comments · Fixed by #5458
Closed

Metavariable-regex is anchored #4807

nbrahms opened this issue Mar 14, 2022 · 3 comments · Fixed by #5458
Assignees
Labels
bug Something isn't working user:external requested by someone outside of r2c

Comments

@nbrahms
Copy link
Contributor

nbrahms commented Mar 14, 2022

Per docs, this should be unanchored:

https://semgrep.dev/s/KgRY

@nbrahms nbrahms added user:external requested by someone outside of r2c bug Something isn't working labels Mar 14, 2022
@r2c-demo
Copy link
Collaborator

This issue is synced in Linear at https://linear.app/r2c/issue/PA-980/metavariable-regex-is-left-anchored.

@aryx aryx changed the title Metavariable-regex is left-anchored Metavariable-regex is anchored Mar 15, 2022
@aryx
Copy link
Collaborator

aryx commented Jun 1, 2022

@mjambon can we close this issue?

@mjambon
Copy link
Member

mjambon commented Jun 2, 2022

@aryx no, I didn't touch that. I wasn't aware of this bug. For example, the pattern a should match xxa but currently, it doesn't. The issue is apparently that the regexp is matched at the beginning of the string using something like Pcre.pmatch instead of being matched successively at all the positions in the string using the appropriate function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working user:external requested by someone outside of r2c
Development

Successfully merging a pull request may close this issue.

4 participants