83 writes to _pos
System.Text.RegularExpressions (83)
System\Text\RegularExpressions\RegexParser.cs (83)
75_pos = 0; 235parser._pos = i; 259_pos = 0; 293_pos++; 298_pos++; 312_pos++; 440--_pos; 457ch = _pattern[_pos++]; 486_pos++; 491if (startpos == _pos || _pos == _pattern.Length || _pattern[_pos++] != '}') 495_pos = startpos - 1; 511_pos++; 550_pos = _pattern.IndexOf('$', _pos); 553_pos = _pattern.Length; 560_pos++; 589_pos++; 609_pos++; 626ch = _pattern[_pos++]; 662switch (ch = _pattern[_pos++]) 740--_pos; 780_pos++; 786_pos++; 837_pos++; 848char ch = _pattern[_pos++]; 883switch (ch = _pattern[_pos++]) 908--_pos; 964_pos++; 1005if ((capnum != -1 || uncapnum != -1) && _pos < _pattern.Length && _pattern[_pos++] == close) 1025if (_pos < _pattern.Length && _pattern[_pos++] == ')') 1041if (_capnames?[capname] is int tmpCapnum && _pos < _pattern.Length && _pattern[_pos++] == ')') 1049_pos = parenPos - 1; // jump to the start of the parentheses 1070--_pos; 1085if ((ch = _pattern[_pos++]) == ')') 1116_pos++; 1122_pos = _pattern.IndexOf('\n', _pos); 1125_pos = _pattern.Length; 1130_pos = _pattern.IndexOf(')', _pos); 1133_pos = _pattern.Length; 1137_pos++; 1159_pos++; 1164_pos++; 1169_pos++; 1174_pos++; 1179_pos++; 1184_pos++; 1189_pos++; 1194_pos++; 1200_pos++; 1241_pos++; 1242ch = _pattern[_pos++]; 1264_pos++; 1274if (_pos < _pattern.Length && _pattern[_pos++] == close) 1299_pos++; 1340if (_pos < _pattern.Length && _pattern[_pos++] == close) 1351_pos = backpos; 1377_pos++; 1393_pos++; 1410_pos++; 1417_pos = lastEndPos; 1426if (!angled || _pos < _pattern.Length && _pattern[_pos++] == '}') 1438if (_pos < _pattern.Length && _pattern[_pos++] == '}') 1453_pos++; 1479_pos++; 1486_pos = backpos; 1497if (!RegexCharClass.IsBoundaryWordChar(_pattern[_pos++])) 1499--_pos; 1516_pos++; 1539_pos++; 1561char ch = _pattern[_pos++]; 1588char ch = _pattern[_pos++]; 1608for (bool off = false; _pos < _pattern.Length; _pos++) 1651char ch = _pattern[_pos++]; 1655--_pos; 1700char ch = _pattern[_pos++]; 1709ch = _pattern[_pos++]; 1712--_pos; 1719if (_pos == _pattern.Length || _pattern[_pos++] != '}') 1871char ch = _pattern[_pos++]; 1884--_pos; 1904--_pos; 1913_pos++; 1919_pos++; 1947_pos++;
156 references to _pos
System.Text.RegularExpressions (156)
System\Text\RegularExpressions\RegexParser.cs (156)
241i = parser._pos; 279while (_pos < _pattern.Length) 286int startpos = _pos; 292while (_pos < _pattern.Length && (!IsSpecialOrSpace(ch = _pattern[_pos]) || (ch == '{' && !IsTrueQuantifier()))) 297while (_pos < _pattern.Length && (!IsSpecial(ch = _pattern[_pos]) || (ch == '{' && !IsTrueQuantifier()))) 301int endpos = _pos; 305if (_pos == _pattern.Length) 309else if (IsSpecial(ch = _pattern[_pos])) 385if (_pos == _pattern.Length) 450if (_pos == _pattern.Length || !(isQuantifier = IsTrueQuantifier())) 480startpos = _pos; 482if (startpos < _pos) 484if (_pos < _pattern.Length && _pattern[_pos] == ',') 487max = _pos == _pattern.Length || _pattern[_pos] == '}' ? int.MaxValue : ScanDecimal(); 491if (startpos == _pos || _pos == _pattern.Length || _pattern[_pos++] != '}') 509if (_pos < _pattern.Length && _pattern[_pos] == '?') 546while (_pos < _pattern.Length) 548int startpos = _pos; 550_pos = _pattern.IndexOf('$', _pos); 551if (_pos < 0) 556AddToConcatenate(startpos, _pos - startpos, isReplacement: true); 558if (_pos < _pattern.Length) 587if (_pos < _pattern.Length && _pattern[_pos] == '^') 594if ((_options & RegexOptions.ECMAScript) != 0 && _pattern[_pos] == ']') 600for (; _pos < _pattern.Length; firstChar = false) 607if (_pos < _pattern.Length && _pattern[_pos] == '^') 614if ((_options & RegexOptions.ECMAScript) != 0 && _pos < _pattern.Length && _pattern[_pos] == ']') 619if (_pos >= _pattern.Length) 647if (_pos < _pattern.Length && _pattern[_pos] != ']') 660else if (ch == '\\' && _pos < _pattern.Length) 672charClass!.AddDigit((_options & RegexOptions.ECMAScript) != 0, ch == 'D', _pattern, _pos); 710charClass!.AddCategoryFromName(ParseProperty(), ch != 'p', caseInsensitive, _pattern, _pos); 775else if (_pos + 1 < _pattern.Length && _pattern[_pos] == '-' && _pattern[_pos + 1] != ']') 782else if (_pos < _pattern.Length && ch == '-' && !translatedChar && _pattern[_pos] == '[' && !firstChar) 824if (_pos == _pattern.Length || _pattern[_pos] != '?' || (_pos + 1 < _pattern.Length && _pattern[_pos + 1] == ')')) 841if (_pos == _pattern.Length) 878if (_pos == _pattern.Length) 925if (_pos < _pattern.Length && !(_pattern[_pos] == close || _pattern[_pos] == '-')) 945if (_pos < _pattern.Length && !(_pattern[_pos] == close || _pattern[_pos] == '-')) 962if ((capnum != -1 || proceed) && _pos + 1 < _pattern.Length && _pattern[_pos] == '-') 965ch = _pattern[_pos]; 977if (_pos < _pattern.Length && _pattern[_pos] != close) 991if (_pos < _pattern.Length && _pattern[_pos] != close) 1005if ((capnum != -1 || uncapnum != -1) && _pos < _pattern.Length && _pattern[_pos++] == close) 1016int parenPos = _pos; 1017if (_pos < _pattern.Length) 1019ch = _pattern[_pos]; 1025if (_pos < _pattern.Length && _pattern[_pos++] == ')') 1041if (_capnames?[capname] is int tmpCapnum && _pos < _pattern.Length && _pattern[_pos++] == ')') 1052if (_pos + 2 < _pattern.Length && _pattern[_pos + 1] == '?') 1055if (_pattern[_pos + 2] == '#') 1061if (_pattern[_pos + 2] == '\'' || (_pos + 3 < _pattern.Length && _pattern[_pos + 2] == '<' && _pattern[_pos + 3] != '!' && _pattern[_pos + 3] != '=')) 1080if (_pos == _pattern.Length) 1114while (_pos < _pattern.Length && IsSpace(_pattern[_pos])) 1120if ((_options & RegexOptions.IgnorePatternWhitespace) != 0 && _pos < _pattern.Length && _pattern[_pos] == '#') 1122_pos = _pattern.IndexOf('\n', _pos); 1123if (_pos < 0) 1128else if (_pos + 2 < _pattern.Length && _pattern[_pos + 2] == '#' && _pattern[_pos + 1] == '?' && _pattern[_pos] == '(') 1130_pos = _pattern.IndexOf(')', _pos); 1131if (_pos < 0) 1149Debug.Assert(_pos < _pattern.Length, "The current reading position must not be at the end of the pattern"); 1152switch (ch = _pattern[_pos]) 1207cc.AddCategoryFromName(ParseProperty(), ch != 'p', (_options & RegexOptions.IgnoreCase) != 0, _pattern, _pos); 1228Debug.Assert(_pos < _pattern.Length, "The current reading position must not be at the end of the pattern"); 1230int backpos = _pos; 1233char ch = _pattern[_pos]; 1239if (_pos + 1 < _pattern.Length) 1250if (!angled || _pos == _pattern.Length) 1255ch = _pattern[_pos]; 1260else if ((ch == '<' || ch == '\'') && _pos + 1 < _pattern.Length) 1265ch = _pattern[_pos]; 1274if (_pos < _pattern.Length && _pattern[_pos++] == close) 1291int pos = _pos - 1; 1300if (_pos == _pattern.Length || (ch = _pattern[_pos]) < '0' || ch > '9') 1340if (_pos < _pattern.Length && _pattern[_pos++] == close) 1362if (_pos == _pattern.Length) 1367char ch = _pattern[_pos]; 1369int backpos = _pos; 1374if (ch == '{' && _pos + 1 < _pattern.Length) 1378ch = _pattern[_pos]; 1397lastEndPos = _pos; 1400while (_pos < _pattern.Length && (ch = _pattern[_pos]) >= '0' && ch <= '9') 1414lastEndPos = _pos; 1426if (!angled || _pos < _pattern.Length && _pattern[_pos++] == '}') 1438if (_pos < _pattern.Length && _pattern[_pos++] == '}') 1493int startpos = _pos; 1495while (_pos < _pattern.Length) 1504return _pattern.Substring(startpos, _pos - startpos); 1511int c = Math.Min(3, _pattern.Length - _pos); 1514for (i = 0; c > 0 && (uint)(d = _pattern[_pos] - '0') <= 7; c -= 1) 1537while (_pos < _pattern.Length && (uint)(d = (char)(_pattern[_pos] - '0')) <= 9) 1557if (_pos + c <= _pattern.Length) 1583if (_pos == _pattern.Length) 1608for (bool off = false; _pos < _pattern.Length; _pos++) 1610char ch = _pattern[_pos]; 1695if (_pos + 2 >= _pattern.Length) 1706int startpos = _pos; 1707while (_pos < _pattern.Length) 1717string capname = _pattern.Substring(startpos, _pos - startpos); 1719if (_pos == _pattern.Length || _pattern[_pos++] != '}') 1868while (_pos < _pattern.Length) 1870int pos = _pos; 1875if (_pos < _pattern.Length) 1901if (_pos + 1 < _pattern.Length && _pattern[_pos + 1] == '#' && _pattern[_pos] == '?') 1910if (_pos < _pattern.Length && _pattern[_pos] == '?') 1915if (_pos + 1 < _pattern.Length && (_pattern[_pos] == '<' || _pattern[_pos] == '\'')) 1920ch = _pattern[_pos]; 1942if (_pos < _pattern.Length) 1944if (_pattern[_pos] == ')') 1950else if (_pattern[_pos] == '(') 2152Debug.Assert(_pos < _pattern.Length, "The current reading position must not be at the end of the pattern"); 2154int startpos = _pos; 2162int nChars = _pattern.Length - _pos; 2288new RegexParseException(error, _pos, SR.Format(SR.MakeException, _pattern, _pos, message));