zip's

while(true) { Write it down; Think about it; Refine it; Sleep(); }

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

.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);
}

 

posted on 2010-06-12 11:24  zip's  阅读(168)  评论(0)    收藏  举报