private void button2_Click(object sender, EventArgs e) { Regex reg = new Regex(@"/[([/+|-]?/d+(?:./d*)?),([/+|-]?/d+(?:./d*)?)/]"); string text = "[+1.2,-3.4][5.67,+34.23][-12.365,8888]"; MatchCollection mc = reg.Matches(text); foreach (Match match in mc) { if (match.Groups.Count != 3) return; double a = Convert.ToDouble(match.Groups[1].Value); double b = Convert.ToDouble(match.Groups[2].Value); Console.WriteLine("{0},{1}",a,b ); } } http://www.rubular.com/ 强烈推荐这个正则表达式在线测试工具,用起来特别方便