日期:2014-05-18 浏览次数:20790 次
string s = "(L11+L12+L22)*0.25+L18"; foreach (System.Text.RegularExpressions.Match m in System.Text.RegularExpressions.Regex.Matches(s, @"L\d+")) { string value = m.Value; }
------解决方案--------------------
//using System.Text.RegularExpressions;
foreach (Match m in Regex.Matches("(L11+L12+L22)*0.25+L18", @"L\d+"))
{
Console.WriteLine(m.Value);
}