I agree with Hiren: you could use a Regex, but it would be a sledgehammer to crack a nut.
The trouble is that the regex would have to cope with:
200
199
7.888
-13.6
but reject
-100.001
Not easy to write in the first place, not easy to maintain (what if the limits change?).
It is not a good Regex task: if you must do this from a string than do it this way:
bool ValidateFloat(string s)
{
float f;
if (float.TryParse(s, out f))
{
if ((f >= -100.000) && (f <= 200.000))
{
return true;
}
}
return false;
}
If nothing else, it is a lot easier to read and understand!