public bool IsNumber(string value) { Regex r = new Regex(@"^/d+(/.)?/d*$"); return r.IsMatch(value); } public bool IsInteger(string value) { Regex r = new Regex(@"^/d+$"); return r.IsMatch(value); }