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

Path regex isn't working #34

Open
mgershovitz opened this issue Dec 14, 2022 · 2 comments
Open

Path regex isn't working #34

mgershovitz opened this issue Dec 14, 2022 · 2 comments

Comments

@mgershovitz
Copy link

I'm trying to create an auto group pattern based and a path.
My site looks like this -
https://www.domain.com/tasks/?t=

I've tried using this pattern -
https://*.domain.com/tasks

This is the way it was shown to be used in the patterns page https://developer.chrome.com/docs/extensions/mv3/match_patterns/

But it didn't catch my urls.
I've tried a few other options and none of them worked

@mgershovitz
Copy link
Author

Ok, after checking your tests here I found an option that work.

This is the pattern I used that worked - *.www. domain.com/tasks

This type of pattern isn't detailed in the chrom regex pattern matching examples. It might be worth to create a specific page of your own.

@loilo
Copy link
Owner

loilo commented Mar 10, 2023

Hey Maya, thanks for your feedback. (And sorry for coming back to you so late — seems I had accidentally unwatched my own repo. 😓)

I've tried using this pattern - https://*.domain.com/tasks

This will work for https://domain.com/tasks or https://www.domain.com/tasks, but since you have specified a URL path (/task) in your pattern, it requires the tab's URL to match that exactly, so whatever comes after that (/?t= in your example) causes the non-match.

Using https://*.domain.com/tasks* should work for you here. (You also can omit the HTTPS prefix, just for convenience: *.domain.com/tasks*.)

This is the pattern I used that worked - *.www. domain.com/tasks

I'm not quite sure I exactly understand the pattern you used. That one includes... a space, if I'm taking this correctly? This should definitively never work. Is this the exact pattern you used? (Please consider re-posting it with backticks, I'm suspecting GitHub's markdown renderer to have done funny things to your original pattern...)

This type of pattern isn't detailed in the chrom regex pattern matching examples. It might be worth to create a specific page of your own.

As mentioned above, this kind of pattern is not even supposed to work, so it probably wouldn't be documented anyway. That said, the extension's pattern evaluator does diverge from the match patterns documentation in subtle ways (mostly to enable extra scenarios that match patterns wouldn't allow for), but those should be edge cases not affecting your situation. However, I've already had auto-group-tabs.com registered for a while, and I'm planning to put some extended documentation there — but I'm not sure when I'll have the resources (time, mostly) for doing this and how to prioritize it with other feature requests for the extension.

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