.NET
System.Text.RegularExpressions
string s = "+.055";
Regex r = new Regex(@"^[+-]?(\d*\.\d+|\d+|\d+\.\d*)$", RegexOptions.IgnoreCase);
Match m = r.Match(s);
if (m.Success)
{
double d = Convert.ToDouble(m.Value);
}
zip'swhile(true) { Write it down; Think about it; Refine it; Sleep(); } |