notify: check for regexps starting with *

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@5398 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2014-04-01 12:00:25 +00:00
parent db7ca07c6d
commit 28a6339922

View File

@@ -35,6 +35,7 @@ notify_Define($$)
}
# Checking for misleading regexps
return "Bad regexp: starting with *" if($re =~ m/^\*/);
eval { "Hallo" =~ m/^$re$/ };
return "Bad regexp: $@" if($@);
$hash->{REGEXP} = $re;