commit 3890061aef93931a65e524130735b657c658461e
parent 938f14feee2dffe341c5466f38ce211c4dd67cdc
Author: René Wagner <rwagner@rw-net.de>
Date: Sun, 30 Aug 2020 16:12:46 +0200
allow whitespace in filter criteria
simplify validation regex for -f param
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/phosta.pl b/phosta.pl
@@ -84,7 +84,7 @@ sub validate
$opt_E =~ /^([a-z]{2,4}){1,}(\,[a-z]{2,4}){0,}$/ or return 0;
- !defined($opt_f) || $opt_f =~ /^[\w\-]{2,}(!){0,1}=[\w]{1,}(,[\w]{2,}(!){0,1}=[\w\-]{1,}){0,}$/ or return 0;
+ !defined($opt_f) || $opt_f =~ /^(,{0,1}[\w\-]{2,}(!){0,1}=[\w\-\s]{1,}){1,}$/ or return 0;
return 1;
}