0

I'm trying to create a regex filter on mv3 declarativeNetRequest rule but it keep giving me this error

Rule with id 1 specifies an incorrect value for the "regexFilter" key.

This is the regex I used

^https:\/\/example\.com\/js\/script\.js(\?(?!\bext\b)[^&=]+(=[^&=]*)*)?$

This should match https://example.com/js/script.js?<anything> but should fail on exactly https://example.com/js/script.js?ext

The regex seems to be ES regex compliant and works just fine when I test it.

isherwood
  • 58,414
  • 16
  • 114
  • 157
  • As the documentation says RE2 syntax used by this API doesn't support `?!`. You'll have to use two rules, one blocking everything and the other one is an exception with a higher priority. – wOxxOm Apr 18 '23 at 18:15

0 Answers0