bee-san / bee-san/pyWhat

URL regex does not fully match every URL

Open
#117 5 comments 0 reactions 0 assignees View on GitHub
Regex issue
Dominant language
Python
Stars
7.3k
Forks
391
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Research direction

Start with pyWhat’s URL regex implementation and inspect issue #51 for the URL subcategory context. Reproduce the examples in the issue, including google.co, google.com, and pywhat google.com/help; done means the matching behavior is covered and the intended longest-match result is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.