0

I've been trying to figure how to make a pattern that loads a script.

https://twitter.com/fasc1nate/status/1582217359754162176 this is an example of a url that a would like to match.

specifically any twitter url that has /status/ anywhere in it.

i have tried with

"matches": ["*://*.twitter.com/*"]"
"matches": ["*://*.twitter.com/*/status"]"
"matches": ["*://*.twitter.com/*/status/*"]"
"matches": ["*://*.twitter.com/*/status/*/"]"

but i cant seem to get it.

yocto
  • 1
  • 1
    the URL that you are using as an example does not have `www.` which based on your pattern matches it would pick up, BUT you have a `.` in all of the URLs before `twitter`, try removing that period in all of the URLs and see if it works. – Andrew Ryan Oct 18 '22 at 17:34
  • that didn't work, but with or without the dot https://twitter.com/home works. – yocto Oct 20 '22 at 03:12

1 Answers1

0

Playing around with how to test a URL match pattern against a URL string

you can get the last two to match based on the URL that you gave as an example with

"matches": ["*//twitter.com/*/status/*"], 
"matches": ["*//twitter.com/*/status/*/"], 
Andrew Ryan
  • 1,489
  • 3
  • 15
  • 21