From bfee230c799185b5898f226269e9efb85207d125 Mon Sep 17 00:00:00 2001
From: Andras Tim <andras.tim@gmail.com>
Date: Mon, 11 Jan 2021 17:05:17 +0100
Subject: [PATCH] scripts/list: User same wildcard regex that the UI use

The CLI and the UI should do the same to be able to add/remove the same
records via any supported interface.

Signed-off-by: Andras Tim <andras.tim@gmail.com>
---
 advanced/Scripts/list.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/advanced/Scripts/list.sh b/advanced/Scripts/list.sh
index 16bb2001..fde46552 100755
--- a/advanced/Scripts/list.sh
+++ b/advanced/Scripts/list.sh
@@ -112,7 +112,7 @@ ProcessDomainList() {
     for dom in "${domList[@]}"; do
         # Format domain into regex filter if requested
         if [[ "${wildcard}" == true ]]; then
-            dom="(^|\\.)${dom//\./\\.}$"
+            dom="(\\.|^)${dom//\./\\.}$"
         fi
 
         # Logic: If addmode then add to desired list and remove from the other;