mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-19 05:40:13 +00:00
Use simpler regex format for wildcards
Use `\.?domain\.com$` instead of `((^)|(\.))domain\.com$` Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
parent
a25a13fde0
commit
7086a400e8
2 changed files with 3 additions and 3 deletions
|
@ -24,5 +24,5 @@ convert_wildcard_to_regex() {
|
|||
# Remove repeated domains (may have been inserted two times due to A and AAAA blocking)
|
||||
uniquedomains="$(uniq <<< "${domains}")"
|
||||
# Automatically generate regex filters and remove old wildcards file
|
||||
awk '{print "((^)|(\\.))"$0"$"}' <<< "${uniquedomains}" >> "${regexFile:?}" && rm "${wildcardFile}"
|
||||
awk '{print "\\.?"$0"$"}' <<< "${uniquedomains}" >> "${regexFile:?}" && rm "${wildcardFile}"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue