We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55fc660 commit 13897c0Copy full SHA for 13897c0
scripts/mikrotik-domain-filter-bash.sh
@@ -385,8 +385,8 @@ extract_domains() {
385
[[ -z "$line" || "$line" =~ ^[[:space:]]*# ]] && continue
386
387
# Extract domain from different formats
388
- if [[ "$line" =~ ^(DOMAIN-SUFFIX|DOMAIN|DOMAIN-KEYWORD),(.+)$ ]]; then
389
- echo "${BASH_REMATCH[2]}" >> "$temp_file"
+ if [[ "$line" =~ ^[[:space:]]*-?[[:space:]]*(DOMAIN-SUFFIX|DOMAIN|DOMAIN-KEYWORD),(.+)$ ]]; then
+ echo "${BASH_REMATCH[2]}" | tr -d '[:space:]' >> "$temp_file"
390
elif [[ "$line" =~ ^[a-zA-Z0-9][a-zA-Z0-9.-]*\.[a-zA-Z]{2,}$ ]]; then
391
echo "$line" >> "$temp_file"
392
fi
0 commit comments