this post was submitted on 21 Nov 2023
2 points (100.0% liked)

uBlockOrigin

759 readers
1 users here now

uBlock Origin - Free, open-source ad content blocker. Easy on CPU and memory.

Related communities: c/linux, c/opensource, c/privacy, c/firefox, c/security, c/librewolf, c/iceraven

founded 2 years ago
MODERATORS
 

Hi, I want to hide an element on a webpage, but a portion of that changes every time I reload the page. It looks something like this:

example.com##class_123456 > element

The bit with the numbers changes every time. I would like to replace this with a regex to match every numeric string of any length. I tried to figure it out myself but couldn't get it to work.

Any help is appreciated, thanks :)

top 2 comments
sorted by: hot top controversial new old
[โ€“] [email protected] 1 points 9 months ago (1 children)

You should be able to use the pattern below. The \d+ means one or more digits.

class_\d+
[โ€“] [email protected] 1 points 9 months ago

thanks, but sadly this didn't do the trick