mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-23 07:40:15 +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
|
@ -141,7 +141,7 @@ AddDomain() {
|
|||
bool=true
|
||||
domain="${1}"
|
||||
|
||||
[[ "${wildcard}" == true ]] && domain="((^)|(\\.))${domain//\./\\.}$"
|
||||
[[ "${wildcard}" == true ]] && domain="\\.?${domain//\./\\.}$"
|
||||
|
||||
# Is the domain in the list?
|
||||
# Search only for exactly matching lines
|
||||
|
@ -189,7 +189,7 @@ RemoveDomain() {
|
|||
[[ -z "${type}" ]] && type="--wildcard-only"
|
||||
domain="${1}"
|
||||
|
||||
[[ "${wildcard}" == true ]] && domain="((^)|(\\.))${domain//\./\\.}$"
|
||||
[[ "${wildcard}" == true ]] && domain="\\.?${domain//\./\\.}$"
|
||||
|
||||
bool=true
|
||||
# Is it in the list?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue