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

grep is returning wrong stuff: it's buggy #41

Open
khwilliamson opened this issue Dec 31, 2017 · 3 comments
Open

grep is returning wrong stuff: it's buggy #41

khwilliamson opened this issue Dec 31, 2017 · 3 comments

Comments

@khwilliamson
Copy link

Context

If I search for
({\d+(,\d+)?}

https://grep.metacpan.org/search?q=%5C%28%5C%7B%5Cd%2B%28%2C%5Cd%2B%29%3F%5C%7D&qd=&qft=

one result I get is this (for Language::Expr)

{category=>'map', has_subexpr=>1, text=>'map({1<}, [])', parse_error=>qr/invalid syntax/i}, # invalid subexpression

That does not match the input expression. There is a '<' that it seems to think is a \d

If I do the same search on grep.cpan.me, I get many more results.

https://grep.cpan.me/?q=%5C%28%5C%7B%5Cd%2B%28%2C%5Cd%2B%29%3F%5C%7D&page=3

I'm not sure that there is any overlap between the results, which would mean it also is buggy

@haarg
Copy link
Member

haarg commented Jan 2, 2018

I believe this is the same issue as #41. There is an odd attempt at regex sanitization that I believe should be removed.

@khwilliamson
Copy link
Author

I found another case where bad results are returned. With the demise of grep.cpan.me, this module is all we have, and not being able to rely on its accuracy is a big deal.

If @haarg is right, this should be an easy fix.

The new failing search is \bOff\s*(
without the \s* it finds things that it should also find with the \s*

@khwilliamson
Copy link
Author

\bOff\s*\( rather. Without quoting, github stripped things

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