Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
^((\[\$[^\]]+\])?([^\^$\\{\@\"\!]*?|~?\/.+\/))(#@?[$?]{1,2}#|#@?%#(?=\/\/)|#@?#[\^\+]?|\$\@?\$)(.*)$
/
gm
Input 1
1
New
!typo example.com|example.org##.ads ~example.com,example.com##.ads [$app=~org.example.app1|~org.example.app2]example.com##.textad example.com/##.ads ~0.0.0.0,~127.0.0.1,~[::1],~[::],~local,~localhost##.textad /^https?:\/\/(?:www\.|[0-9a-z]{7,10}\.)?[-0-9a-z]{5,}\.com\/\/?(?:[0-9a-z]{2}\/){2,3}[0-9a-f]{32}\.js/##.textad /https:\/\/[-a-z]{8,}\.com\/[f-j][-0-9A-Z_a-z]{2,}\/[0-9A-Za-z][-\/0-9A-Z_a-z]{7,}$/##.textad /\/[0-9a-f]{32}\.js/##.textad /\.\d{1,2}\.[0-9a-f]{32}\.js$/##.textad /^https?:\/\/(?:www\.|[0-9a-z]{7,10}\.)?[-0-9a-z]{5,}\.com\/\/?(?:[0-9a-z]{2}\/){2,3}[0-9a-f]{32}\.js/##.textad /^https:\/\/[-a-z]{8,}\.com\/[f-j][-0-9A-Z_a-z]{2,}\/[0-9A-Za-z][-\/0-9A-Z_a-z]{7,}$/##.textad /\/[0-9a-f]{32}\.js/##.textad /\.\d{1,2}\.[0-9a-f]{32}\.js$/##.textad ~/^https?:\/\/[a-z]{8,15}\.club\/[%0-9a-zA-Z]{170,}$/##.textad ! ! Element hiding rules ! https://adguard.com/kb/general/ad-filtering/create-own-filters/#cosmetic-elemhide-rules ##.ads ###img ##img #@#.ads #@##img #@#img example.com##.ads example.com###img example.com##img example.com#@#.ads example.com#@##img example.com#@#img ! CSS rules ! https://adguard.com/kb/general/ad-filtering/create-own-filters/#cosmetic-css-rules example.com#$#div { visibility: hidden; } example.com#@$#div { visibility: hidden; } example.com#$#.textad { visibility: hidden; } example.com#@$#.textad { visibility: hidden; } example.com#$##textad { visibility: hidden; } example.com#@$##textad { visibility: hidden; } ! Extended CSS selectors ! https://adguard.com/kb/general/ad-filtering/create-own-filters/#extended-css-selectors example.com#?#div:has(> a[target="_blank"][rel="nofollow"]) example.com#@?#div:has(> a[target="_blank"][rel="nofollow"]) example.com#?#.banner:matches-css(width: 360px) example.com#@?#.banner:matches-css(width: 360px) example.com#?##banner:matches-css(width: 360px) example.com#@?##banner:matches-css(width: 360px) example.com#$?#div:has(> span) { display: none !important; } example.com#@$?#div:has(> span) { display: none !important; } example.com#$?#.banner:has(> span) { display: none !important; } example.com#@$?#.banner:has(> span) { display: none !important; } example.com#$?##banner:has(> span) { display: none !important; } example.com#@$?##banner:has(> span) { display: none !important; } ! HTML filtering ! https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#html-filters ! https://adguard.com/kb/general/ad-filtering/create-own-filters/#html-filtering-rules example.com##^.badstuff example.com#@#^script:has-text(7c9e3a5d51cdacfc) example.org$$div[some_attribute] example.com$@$script[tag-content="banner"] ! Scriptlets ! https://adguard.com/kb/general/ad-filtering/create-own-filters/#scriptlets ~b.com,a.com##+js(...) #%#//scriptlet('adjust-setInterval', 'count', '*', '0.001') example.com#%#//scriptlet('set-local-storage-item', 'ALLOW_COOKIES', 'false') example.com#@%#//scriptlet() ! JavaScript rules ! https://adguard.com/kb/general/ad-filtering/create-own-filters/#javascript-rules ! https://adguard.com/kb/general/ad-filtering/create-own-filters/#scriptlets #%#window.__gaq = undefined; #@%#window.__gaq = undefined; example.org#%#window.__gaq = undefined;