Skip to content

Commit

Permalink
improved regex :#2
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ari committed Jul 4, 2015
1 parent e9d8857 commit 700ea8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ukhasnet.pl
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
if ($type->{'type'} eq "Float"){
my $p=0;
foreach my $v (split(/,/, $val)){
if ($v =~ /[0-9]+\.?[0-9]*/){
if ($v =~ /^-?[0-9]+\.?[0-9]*$/){
$data_float->execute($datarow->{'packetid'}, $type->{'id'}, $v, $p++);
} else {
syslog('error', "Error processing type ".$type->{'id'}." with value $v (".$datarow->{'packetid'}.")");
Expand Down

0 comments on commit 700ea8b

Please sign in to comment.