in reply to Regex to check for very large negative numbers
I think you are approaching this the wrong way around.
- Ask yourself "what is the reasonable range of expected data?" (-A <= data <= B).
- Now set your lower limit at 2*A and your upper limit at 2*B
- Validate your data by asking two questions: 1) is is less than my lower limit? 2) Is it greater than my upper limit?
- If the answer to either of these questions is 'yes', drop the data point. (Personally, I'd log it as well for later review.)
Update: Cleaned up the wording. (I hate it when I change metaphors in mid stream.)
----
I Go Back to Sleep, Now.
OGB
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Regex to check for very large negative numbers
by igelkott (Priest) on Feb 22, 2013 at 10:13 UTC |
In Section
Seekers of Perl Wisdom