Wildcards / Regex info

Hi,

I am just a regular user who does not even understand the difference between wildcards and regex, but I did notice that the Regex / Wildcard blocking section contains some entries that do not appear to actually block anything. For example, the list contains:

(^|.)pubnub$

yet when I check the Query log there are lots of entries like

ps-161.pubnub.com

I also have an entry

(^|.)philips.com$

but I still find philips queries in the Query log. Can anyone explain?

on this site, you can test if your regex actually affects (matches) your domain.

on this site, you can check what your regex will try to accomplish.

your results:

no match

and

edit
here is the pihole tutorial
/edit

2 Likes

That still wouldn't match ps-161.pubnub.com, as it (as per $) requires the hostname to end with pubnub.
I guess you probably meant to quote (^|\.)philips.com$?

Anyways, @jpgpi250's above link to Pi-hole's doc on regex contains all the relevant details to fix this.

Thanks a lot for the link to the tutorial. I had been looking for that! As to your first suggestion about testing my entries, I was completely stumped ("you can test if your regex actually affects (matches) your domain"): I have no idea what you mean by "matching your domain".

However, thanks to the tutorial I was able to modify my entries so that they now read:
"pubnub" and "philips". That seems to do a much better job.

I realise that but the problem is that the sites I am trying to block use a variety of domain names, or so it would seem.

Thanks, I'll bear that in mind. For the time being I am happy using such general blocks.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.