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 )))";
MatchCollection s = Regex.Matches ("3000 qs / min", rte , RegexOptions.IgnoreCase);
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);
ExplicitCapture
\b*(?<points>\d{1}) point to print (?<qs>\d{1,4})\b</qs></points>
6
3000
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)