2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-17 11:26:03 +00:00

fhem.pl: readd []/{} for ReplaceSetMagic (Forum )

git-svn-id: https://svn.fhem.de/fhem/trunk@8801 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2015-06-22 19:19:08 +00:00
parent 3350f1a9b9
commit 2d3ef78eee

@ -1492,11 +1492,11 @@ ReplaceSetMagic(@) # Forum #38276
my $a = join(" ", @_); my $a = join(" ", @_);
$a =~ s/\[([a-z0-9._]+):([A-z0-9._]+)\]/{ $a =~ s/\[([a-z0-9._]+):([A-z0-9._]+)\]/{
my $x = ReadingsVal($1,$2,""); $x eq "" ? "$1:$2" : $x my $x = ReadingsVal($1,$2,""); $x eq "" ? "$1:$2" : "[$x]"
}/egi; }/egi;
$a =~ s/{([^}]+)}/{ $a =~ s/{([^}]+)}/{
my $x = eval $1; $@ ? $1 : $x my $x = eval $1; $@ ? $1 : "{$x}"
}/eg; }/eg;
return split(" ", $a); return split(" ", $a);