mirror of
https://github.com/pi-hole/docs.git
synced 2026-02-20 00:55:10 +08:00
585 B
585 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, 1 on errors and 2 on no match, hence, it may be used for scripting.