Help with regex

Hello Everypne!

I'm trying to utilize a regex for youtube ads to try and get rid of all the political ads, and according to POSIX PO pattern - Regex Tester/Debugger it should be working. here is the expression:

^r\d\d?---sn-([a-z]{6,20}-).*([d|e|k|l|r|s|y|z|6|7].googlevideo.com)$

is there anything in the above expression that FTL won't work with? do i need to add /g?

I believe your endeavor will be fruitless, as there is no reliable way to block YouTube ads with regex, and particularly to block a specific category of ads.

Your best approach for an ad-free YouTube experience is (1) subscribe to YouTube Premium (or whatever they call it now), or (2) watch YouTube on a browser running an adblocker such as uBlock Origin.

the question I have is specific to the regex.. it isn't even being evaluated against as far as I can tell with even DEBUG_REGEX set to true. I know youtube ads are fruitless, but as i'm on paternity leave I took on this challenge to keep my mind working :slight_smile:

I did, and this should be valid, which is why i'm asking for confirmation / help? :man_shrugging:

Here's the regex that worked:

^r[0-9][0-9]?---sn-[a-z]{6,20}-[a-z]{3}([d|e|k|l|r|s|y|z|6|7].googlevideo.com){1}$

the \d's weren't working for some reason it seems.