Need help with regexp

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Locked
drloser
Posts: 4
Joined: Sun Mar 13, 2016 8:15 am

Need help with regexp

Post by drloser »

Hello,

I'm trying to filter this kind of stuff:

senscritique.com##.demh-container.demh185-product
senscritique.com##.demh-container.demh187-product
senscritique.com##.demh-container.demh188-product
senscritique.com##.demh-container.demh189-product
senscritique.com##.demh-container.demh190-product
senscritique.com##.demh-container.demh191-product
...

I tried to use the below regexp, but it's not working:

senscritique\.com\#{2}\.demh-container\.demh\d+-product

Any idea?
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Need help with regexp

Post by mapx »

you could try:

Code: Select all

senscritique.com##div[class^="demh-container.demh"]
or

Code: Select all

senscritique.com##div[class^="demh-container.demh"][class$="-product"]
see en/filters#elemhide_attributes
drloser
Posts: 4
Joined: Sun Mar 13, 2016 8:15 am

Re: Need help with regexp

Post by drloser »

It's not working... I will have a look at that link.
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Need help with regexp

Post by mapx »

provide the specific page, explain what elements in the page you want to hide
drloser
Posts: 4
Joined: Sun Mar 13, 2016 8:15 am

Re: Need help with regexp

Post by drloser »

It's the large banner which appears on top of this page by example. You can't miss it:
http://www.senscritique.com/series
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Need help with regexp

Post by mapx »

test this filter

Code: Select all

senscritique.com##[class^="demh-container demh"][data-sc-tyson-element-event="product-click"]
however if you use firefox, install EHH (element hiding helper) to create your own hiding filters, use it in advanced view, you'll can edit your hiding filters (keeping the stable part)
drloser
Posts: 4
Joined: Sun Mar 13, 2016 8:15 am

Re: Need help with regexp

Post by drloser »

(I use Chrome.)

This last filter seems to be working perfectly fine. Thanks a lot.
Locked