string pattern = @" [^0-9]+ " ; return System.Text.RegularExpressions.Regex.Replace(str, pattern, "" );

正则表达式提取小数

private static string RegexParseDouble(string str)
            Regex r = new Regex(@"\d*\.\d*|0\.\d*[1-9]\d*$");
            return r.Match(str).Value;