98_JsonMod.pm: parsing of division sign in expression (Forum #122166)

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@24783 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
herrmannj 2021-07-21 22:37:12 +00:00
parent 6c0b14be68
commit 93a2131729

View File

@ -299,7 +299,13 @@ sub JsonMod_DoReadings {
my ($args, $cmd);
next if ($readingList =~ s/^\s*#.*\R*//); # remove comments
$readingList =~ s/\//\\\//g; # escape slash forum 122166
($args, $readingList, $cmd) = extract_codeblock ($readingList, '()', '(?m)[^(]*');
$readingList =~ s/\\\//\//g; # revert escaped slash
$args =~ s/\\\//\//g; # revert escaped slash
# say 'A:'.$args;
# say 'R:'.$readingList;
# say 'C:'.$cmd;
if (not $cmd or $@) {
JsonMod_Logger($hash, 2, 'syntax error in readingList statement: \'%s%s\' %s', $readingList);
last;