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

URL regex does not fully match every URL #117

Open
ghost opened this issue Jul 16, 2021 · 5 comments · Fixed by #119
Open

URL regex does not fully match every URL #117

ghost opened this issue Jul 16, 2021 · 5 comments · Fixed by #119
Labels
Regex issue Regex is not full or matches a lot of false positives

Comments

@ghost
Copy link

ghost commented Jul 16, 2021

For example:
image

I would like it to return both google.co and google.com. Sadly, it may be impossible considering the way regular expressions work. Thus, it would be amazing to match the longest string (pywhat google.com/help should return google.com/help). It is crucial for implementing URL subcategories properly(#51). Btw, URL regex is too long, I do not think that valid TLDs should be checked, so it may be shortened.

@bee-san
Copy link
Owner

bee-san commented Jul 16, 2021

I do not think that valid TLDs should be checked

The reason we do this is because of false positives by the way :)

@ghost
Copy link
Author

ghost commented Jul 16, 2021

sad

@ghost ghost self-assigned this Jul 19, 2021
@ghost ghost mentioned this issue Jul 19, 2021
@ghost ghost changed the title URL regex does not return all possible matches URL regex does not fully match every URL Jul 21, 2021
@ghost
Copy link
Author

ghost commented Jul 21, 2021

Reopening this since pywhat does not match something like https://www.google.com fully.

@ghost ghost reopened this Jul 21, 2021
@ghost ghost removed their assignment Jul 24, 2021
@ghost
Copy link
Author

ghost commented Jul 24, 2021

Hey, @amadejpapez, do you have any ideas about this one?

@amadejpapez
Copy link
Collaborator

Hey, @amadejpapez, do you have any ideas about this one?

Hm will check this later today and see if I get any.

@ghost ghost added the Regex issue Regex is not full or matches a lot of false positives label Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Regex issue Regex is not full or matches a lot of false positives
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants