Regex Help

Hello guys,

I recently started tinkering with pi-hole and i am really impressed by it’s functionality and so on but i am a real noob when it comes to linux in general(i do undestand what commands mean and so on,also documenting on how to fix errors) but i tried to understand the Regex functionality and also looked for the past few hours on the forum for information that might help me understand the commands better.
The problem is i couldn’t really understand how to mix the commands but you guys might help me with my ideea .It is a bit hard for me to translate that into logical/linux language :stuck_out_tongue:

The following blocked address “r1---sn-c0q7lnsl.googlevideo.com” should contain the following variables
“r[1-20]—sn-[1|2|3|4|5|6|7|8].googlevideo.com”. The part where i added “[1|2|3|4|5|6|7|8]” each number is a space that has to have the ability to take any form(number,letter,or punctuation). if for example youtube throws at me r20—sn-“x13-2q0a”.googlevideo.com" the syntax will automatically detect it and block it.
What i noticed is that after “sn-” there are 8 characters that follow and those need to be allowed to take any form.

I hope i could translate my ideea properly.

Thank you

You are beating a death horse in this. Give yourself a rest and use a in browser blocking like uBlock original.

So many postings about blocking Youtube advertising with Regex here that we have a full graveyard of them.

398 posting in one thread

Youtube designed his advertising to sabotage us and frustrate us.

I am sorry that I don’t have better news on this.

1 Like

well thanks for the reply,the thing is that i build this pi-hole more for mobile and smart tv adsblock,especially for the smart tv :slight_smile: .
Anyway thanks for the info :smiley:

On mobile (Andriod) you can uBlock in your browser.

Smart TV is a different area and due to HTTPS you can’t look in that traffic anymore by means of a proxy.
You never know if there will alse be blockers that can work before HTTPS is active.