pi-hole_docs/docs/regex/testmode.md
Rob Gill 9e7955a6cc
Typo corrections
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2025-07-18 08:43:10 +10:00

581 B

Regex Test mode

In order to ease regex development, we added a regex test mode to pihole-FTL which can be invoked like

pihole-FTL regex-test doubleclick.net

(test doubleclick.net against all regexes in the gravity database), or

pihole-FTL regex-test doubleclick.net "(^|\.)double"

(test doubleclick.net against the CLI-provided regex (^|\.)double.

You do NOT need to be sudo for this, any arbitrary user should be able to run this command. The test returns 0 on match and 1 on no match and errors, hence, it may be used for scripting.