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

Unpredictable Regex behavior in TSG #155

Open
nohehf opened this issue Jun 1, 2024 · 0 comments
Open

Unpredictable Regex behavior in TSG #155

nohehf opened this issue Jun 1, 2024 · 0 comments

Comments

@nohehf
Copy link

nohehf commented Jun 1, 2024

As observed in: github/stack-graphs#437 (comment) It seems some regexes are not behaving exactly as their rust counter part.

For instance, in rust the regular expression: ".[^\.\\/]+$" (designed to match the file extension on a path) applied to ./bar wont match (as expected). However in tsg, it will match /bar:

scan "./bar" {
    "\.[^\.\\/]+$" {
      print $0
    }
 }
; execution prints /bar

Note: I did not dig more into the root cause or other inconstancies / minimal reproduction as of now, this is just the exact bug I encountered.

(fyi @hendrikvanantwerpen I'm creating this issue as a follow up to this discussion: github/stack-graphs#439)

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