private string FN(string num)
{
if (num == null) throw new ArgumentNullException("num");
string newstr = string.Empty;
Regex r = new Regex(@"(\d+?)(\d{3})*(\.\d+|$)");
Match m = r.Match(num);
newstr += m.Groups[1].Value;
for (int i = 0; i < m.Groups[2].Captures.Count; i++)
{
newstr += "," + m.Groups[2].Captures[i].Value;
}
newstr += m.Groups[3].Value;
return newstr;
}
全站熱搜
留言列表