cspctec has asked for the wisdom of the Perl Monks concerning the following question:
The normal output from the device is:
-523566.00 -0.0013 0.0045
It could output numbers like the above (which are good outputs). However, sometimes it outputs garbage like this:
-32742987982758110638106318307132432131.0000
I'm trying to create a regular expression that will match large negative numbers and not the smaller ones. If I do something like:
my $match =~ m/-\d+\d+\d+\d+\d+\d+\d+\d+\d+\d+\d+.*\..*/;
It always matches. Can someone help me make a regular expression that matches only large negative numbers?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regex to check for very large negative numbers
by Old_Gray_Bear (Bishop) on Feb 21, 2013 at 20:27 UTC | |
by igelkott (Priest) on Feb 22, 2013 at 10:13 UTC | |
|
Re: Regex to check for very large negative numbers
by moritz (Cardinal) on Feb 21, 2013 at 20:21 UTC | |
|
Re: Regex to check for very large negative numbers
by davido (Cardinal) on Feb 22, 2013 at 00:31 UTC | |
|
Re: Regex to check for very large negative numbers
by BillKSmith (Monsignor) on Feb 21, 2013 at 23:01 UTC | |
|
Re: Regex to check for very large negative numbers
by Athanasius (Archbishop) on Feb 22, 2013 at 11:50 UTC | |
by cspctec (Sexton) on Feb 26, 2013 at 12:55 UTC |