I want to block "abc/def.com", block "xyz/def.com" but not "img/def.com", i.e. I want to block any address when "img" is not preceding "/def.com".
I found this regular expression /(?<!img\/)def\.com/ could work. However, it is an invalid expression in Adblock Plus 0.7.5.1. Does Adblock Plus not fully support regular expression? Or there is any alternative expression could work? Thanks!
Unfully support for Regular Expression
The Adblock Plus documentation page at http://adblockplus.org/en/filters#regexps points to "check out documentation on regular expressions to learn how to write them" at http://developer.mozilla.org/en/docs/Co ... cts:RegExp
Does that help?
Does that help?
(?<!) is a "negative lookbehind" used in PCRE (i.e. Perl). Gecko's JS engine doesn't
support this operator, and since ABP relies on Gecko's JS capabilities, it doesn't either.
Yes, Gecko's JS supports (?!), but this won't help in this case.
The easiest way I see is to make it two rules:
support this operator, and since ABP relies on Gecko's JS capabilities, it doesn't either.
Yes, Gecko's JS supports (?!), but this won't help in this case.
The easiest way I see is to make it two rules:
Code: Select all
/def.com
@@img/def.com