Search lists for regex


#1

how would i search my lists for certain regex? example (^|\.)$ in other words i would like to know what list it came from.


#2

Which lists are you referring to? There is only one regex list - /etc/pihole/regex.list

If you enable regex debugging, your pihole-FTL.log will show you which regex filter was triggered. Example:

[2018-10-22 13:37:55.251] DEBUG: Regex in line 3 "^adse?rv(e(rs?)?|ices?)?[0-9]*[-.]" matches "adservice.google.com"

[2018-10-22 13:38:00.045] DEBUG: Regex in line 7 "^analytics?[-.]" matches "analytics-static.ugc.bazaarvoice.com"

[2018-10-22 14:01:19.850] DEBUG: Regex in line 10 "^clicks?[-.]" matches "click.email.rdaenthusiast.com"

This reference shows where and how to set REGEX_DEBUGMODE=true.

https://docs.pi-hole.net/ftldns/regex/overview/


#3

Regex listsarealso generated when you upgrade to 4.0 Pi-hole FTL.
Wildcard entries are converted to Regex and I don’t know if there is a sanity check and this Regex would been an empty line.


#4

i dont remember creating regex.list but i have (^|\.)$ this under my Regex&Wildcard blocking. i would like to know how do i search my lists to track down its origin.


#5

Regex filters only appear in the file /etc/pihole/regex.list. There is no record kept of where they originated.

The regex you showed can be removed. It was likely an artifact from a conversion.