日期:2014-05-17 浏览次数:20430 次
int[] ary = System.Text.RegularExpressions.Regex.Matches("120*110", "\\d+").Cast<Match>().Select(t =>Convert.ToInt32( t.Value)).ToArray();
------解决方案--------------------
string source = "120*110"; Regex reg = new Regex(@"(\d+)\*(\d+)"); Match mm = reg.Match(source); MessageBox.Show(mm.Groups[1].Value + ":" + mm.Groups[2].Value);