const string numericReg = "\\d+"; // Matches a digit character. Equivalent to [0-9].
const string realNumsReg = numericReg + b + "(\\." + b + numericReg + ")?";
const string b = "\\s*";
这句话是真的:
private const string rte = "(?<rate>" + realNumsReg + ")" +
"(?=(?<rte1>" + b + "qs " + "))";
和
这句话是真的:
private const string barl = "(?<barl>" + numericReg + ")" +
"(?=((?<q>" + b + "point to print )))";
这对于 rte 是正确的:
MatchCollection s = Regex.Matches
("3000 qs / min", rte , RegexOptions.IgnoreCase);
这对 barl 来说是正确的:
MatchCollection s = Regex.Matches
("6 point to print ", barl , RegexOptions.IgnoreCase);
为什么这是错误的?
MatchCollection s = Regex.Matches
("6 point to print 3000 qs/ min", barl+b+rte , RegexOptions.IgnoreCase);