# Author : Johan Vromans
# Created On : Tue Sep 11 15:00:12 1990
# Last Modified By: Johan Vromans
-# Last Modified On: Tue Jun 2 10:40:52 2015
-# Update Count : 1685
+# Last Modified On: Tue Jun 16 15:28:03 2015
+# Update Count : 1695
# Status : Released
################ Module Preamble ################
use strict;
use vars qw($VERSION);
-$VERSION = 2.46;
+$VERSION = 2.47;
# For testing versions only.
use vars qw($VERSION_STRING);
-$VERSION_STRING = "2.46";
+$VERSION_STRING = "2.47";
use Exporter;
use vars qw(@ISA @EXPORT @EXPORT_OK);
"|".
"0[0-7_]*".
")";
-use constant PAT_FLOAT => "[-+]?[0-9_]+(\.[0-9_]+)?([eE][-+]?[0-9_]+)?";
+use constant PAT_FLOAT =>
+ "[-+]?". # optional sign
+ "(?=[0-9.])". # must start with digit or dec.point
+ "[0-9_]*". # digits before the dec.point
+ "(\.[0-9_]+)?". # optional fraction
+ "([eE][-+]?[0-9_]+)?"; # optional exponent
sub GetOptions(@) {
# Shift in default array.
}
elsif ( $type eq 'f' ) { # real number, int is also ok
- # We require at least one digit before a point or 'e',
- # and at least one digit following the point and 'e'.
my $o_valid = PAT_FLOAT;
if ( $bundling && defined $rest &&
$rest =~ /^($key_valid)($o_valid)(.*)$/s ) {
}
elsif ( $type eq 'f' ) { # real number, int is also ok
- # We require at least one digit before a point or 'e',
- # and at least one digit following the point and 'e'.
- # [-]NN[.NN][eNN]
my $o_valid = PAT_FLOAT;
return $arg =~ /^$o_valid$/;
}