-
Notifications
You must be signed in to change notification settings - Fork 7
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
Regex does not match all Amazon TLDs #12
Comments
nestedfunction
added a commit
to nestedfunction/General-URL-Cleaner-Revived
that referenced
this issue
Dec 29, 2023
Seemingly fixed by commit nestedfunction@974fc23 PR #13 Tested on the following URLs:
|
Merged your fix, thanks again! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Issue
The regex in
@include
andconst amazon
(and possibly elsewhere) would not match all Amazon domains/URLs. Consequently, unmatched URLs will not be cleaned.In @include
// @include /^https:\/\/[a-z]+\.amazon\.(?:[a-z]{2,3}|[a-z]{2}\.[a-z]{2})\/.*$/
In
const amazon
Example URLs provided below. There could be others.
To Reproduce
Request the following example Product Links / URLs, and note that some won't be cleaned:
Expected Behavior
All the above URLs should be cleaned.
Attempted Fixes/Workarounds
Explicitly adding the following in "User includes" in Tampermonkey would specifically match Amazon AU only:
/^https:\/\/[a-z]+\.amazon\.com\.au\/.*$/
The following example regex will match the US, JP, SG, AU URLs above. Some variant of such might work in
const amazon
with the scheme (ie https) removed.^https:\/\/[a-z]+\.amazon\.(?:[a-z]{2,3}|[a-z]{2,3}\.[a-z]{2})\/.*$
The text was updated successfully, but these errors were encountered: