Expression |
^(\d{0,4}(?:\.\d{0,2})?
|
[-]\d{0,2}(?:\.\d{0,2})?
)[%]{0,1}$ |
Description |
validates Percents, where Positive numbers are allowed over 100% (in this case up to 9999), but where Negative percents must not go to or below -100%
This also allows for the "%" to be present or missing.
This was used to validate sales Growth Percents (allows for large positive growth, but you could not go negative for more than 100%). |