mirror of
https://github.com/dkogan/feedgnuplot.git
synced 2025-05-06 06:21:16 +08:00
my 'number' regular expression is now captured only when needed
This commit is contained in:
parent
da87a716c1
commit
030676037d
@ -413,8 +413,8 @@ sub mainThread
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# regexp for a possibly floating point, possibly scientific notation number, fully captured
|
# regexp for a possibly floating point, possibly scientific notation number
|
||||||
my $numRE = qr/([-]?[\d\.]+(?:e[-+]?\d+)?)/io;
|
my $numRE = '[-]?[\d\.]+(?:e[-+]?\d+)?';
|
||||||
my @domain;
|
my @domain;
|
||||||
my $haveNewData;
|
my $haveNewData;
|
||||||
|
|
||||||
@ -437,11 +437,11 @@ sub mainThread
|
|||||||
|
|
||||||
if($options{domain})
|
if($options{domain})
|
||||||
{
|
{
|
||||||
/$numRE/go or next;
|
/($numRE)/go or next;
|
||||||
$domain[0] = $1;
|
$domain[0] = $1;
|
||||||
if($options{'3d'} || $options{colormap})
|
if($options{'3d'} || $options{colormap})
|
||||||
{
|
{
|
||||||
/$numRE/go or next;
|
/($numRE)/go or next;
|
||||||
$domain[1] = $1;
|
$domain[1] = $1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -462,7 +462,7 @@ sub mainThread
|
|||||||
|
|
||||||
if($options{dataid})
|
if($options{dataid})
|
||||||
{
|
{
|
||||||
while(/(\w+)\s+$numRE/go)
|
while(/(\w+)\s+($numRE)/go)
|
||||||
{
|
{
|
||||||
my $point = $2;
|
my $point = $2;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user