81 writes to _pos
System.Text.RegularExpressions (81)
System\Text\RegularExpressions\RegexParser.cs (81)
75_pos = 0; 235parser._pos = i; 259_pos = 0; 293_pos++; 298_pos++; 312_pos++; 417--_pos; 434ch = _pattern[_pos++]; 463_pos++; 468if (startpos == _pos || _pos == _pattern.Length || _pattern[_pos++] != '}') 472_pos = startpos - 1; 488_pos++; 527_pos = _pattern.IndexOf('$', _pos); 530_pos = _pattern.Length; 537_pos++; 559_pos++; 573ch = _pattern[_pos++]; 584switch (ch = _pattern[_pos++]) 662--_pos; 703_pos++; 709_pos++; 767_pos++; 778char ch = _pattern[_pos++]; 813switch (ch = _pattern[_pos++]) 838--_pos; 894_pos++; 935if ((capnum != -1 || uncapnum != -1) && _pos < _pattern.Length && _pattern[_pos++] == close) 955if (_pos < _pattern.Length && _pattern[_pos++] == ')') 971if (_capnames?[capname] is int tmpCapnum && _pos < _pattern.Length && _pattern[_pos++] == ')') 979_pos = parenPos - 1; // jump to the start of the parentheses 1000--_pos; 1014if ((ch = _pattern[_pos++]) == ')') 1045_pos++; 1051_pos = _pattern.IndexOf('\n', _pos); 1054_pos = _pattern.Length; 1059_pos = _pattern.IndexOf(')', _pos); 1062_pos = _pattern.Length; 1066_pos++; 1089_pos++; 1094_pos++; 1099_pos++; 1104_pos++; 1109_pos++; 1114_pos++; 1119_pos++; 1125_pos++; 1166_pos++; 1167ch = _pattern[_pos++]; 1189_pos++; 1199if (_pos < _pattern.Length && _pattern[_pos++] == close) 1224_pos++; 1265if (_pos < _pattern.Length && _pattern[_pos++] == close) 1276_pos = backpos; 1302_pos++; 1318_pos++; 1335_pos++; 1342_pos = lastEndPos; 1351if (!angled || _pos < _pattern.Length && _pattern[_pos++] == '}') 1363if (_pos < _pattern.Length && _pattern[_pos++] == '}') 1378_pos++; 1404_pos++; 1411_pos = backpos; 1422if (!RegexCharClass.IsBoundaryWordChar(_pattern[_pos++])) 1424--_pos; 1441_pos++; 1464_pos++; 1486char ch = _pattern[_pos++]; 1513char ch = _pattern[_pos++]; 1533for (bool off = false; _pos < _pattern.Length; _pos++) 1576char ch = _pattern[_pos++]; 1580--_pos; 1625char ch = _pattern[_pos++]; 1634ch = _pattern[_pos++]; 1637--_pos; 1644if (_pos == _pattern.Length || _pattern[_pos++] != '}') 1677char ch = _pattern[_pos++]; 1690--_pos; 1710--_pos; 1719_pos++; 1725_pos++; 1753_pos++;
153 references to _pos
System.Text.RegularExpressions (153)
System\Text\RegularExpressions\RegexParser.cs (153)
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) 427if (_pos == _pattern.Length || !(isQuantifier = IsTrueQuantifier())) 457startpos = _pos; 459if (startpos < _pos) 461if (_pos < _pattern.Length && _pattern[_pos] == ',') 464max = _pos == _pattern.Length || _pattern[_pos] == '}' ? int.MaxValue : ScanDecimal(); 468if (startpos == _pos || _pos == _pattern.Length || _pattern[_pos++] != '}') 486if (_pos < _pattern.Length && _pattern[_pos] == '?') 523while (_pos < _pattern.Length) 525int startpos = _pos; 527_pos = _pattern.IndexOf('$', _pos); 528if (_pos < 0) 533AddToConcatenate(startpos, _pos - startpos, isReplacement: true); 535if (_pos < _pattern.Length) 557if (_pos < _pattern.Length && _pattern[_pos] == '^') 564if ((_options & RegexOptions.ECMAScript) != 0 && _pattern[_pos] == ']') 570for (; _pos < _pattern.Length; firstChar = false) 582else if (ch == '\\' && _pos < _pattern.Length) 594charClass!.AddDigit((_options & RegexOptions.ECMAScript) != 0, ch == 'D', _pattern, _pos); 632charClass!.AddCategoryFromName(ParseProperty(), ch != 'p', caseInsensitive, _pattern, _pos); 682if (_pos < _pattern.Length && _pattern[_pos] != ']') 698else if (_pos + 1 < _pattern.Length && _pattern[_pos] == '-' && _pattern[_pos + 1] != ']') 705else if (_pos < _pattern.Length && ch == '-' && !translatedChar && _pattern[_pos] == '[' && !firstChar) 715if (_pos < _pattern.Length && _pattern[_pos] != ']') 754if (_pos == _pattern.Length || _pattern[_pos] != '?' || (_pos + 1 < _pattern.Length && _pattern[_pos + 1] == ')')) 771if (_pos == _pattern.Length) 808if (_pos == _pattern.Length) 855if (_pos < _pattern.Length && !(_pattern[_pos] == close || _pattern[_pos] == '-')) 875if (_pos < _pattern.Length && !(_pattern[_pos] == close || _pattern[_pos] == '-')) 892if ((capnum != -1 || proceed) && _pos + 1 < _pattern.Length && _pattern[_pos] == '-') 895ch = _pattern[_pos]; 907if (_pos < _pattern.Length && _pattern[_pos] != close) 921if (_pos < _pattern.Length && _pattern[_pos] != close) 935if ((capnum != -1 || uncapnum != -1) && _pos < _pattern.Length && _pattern[_pos++] == close) 946int parenPos = _pos; 947if (_pos < _pattern.Length) 949ch = _pattern[_pos]; 955if (_pos < _pattern.Length && _pattern[_pos++] == ')') 971if (_capnames?[capname] is int tmpCapnum && _pos < _pattern.Length && _pattern[_pos++] == ')') 982if (_pos + 2 < _pattern.Length && _pattern[_pos + 1] == '?') 985if (_pattern[_pos + 2] == '#') 991if (_pattern[_pos + 2] == '\'' || (_pos + 3 < _pattern.Length && _pattern[_pos + 2] == '<' && _pattern[_pos + 3] != '!' && _pattern[_pos + 3] != '=')) 1009if (_pos == _pattern.Length) 1043while (_pos < _pattern.Length && IsSpace(_pattern[_pos])) 1049if ((_options & RegexOptions.IgnorePatternWhitespace) != 0 && _pos < _pattern.Length && _pattern[_pos] == '#') 1051_pos = _pattern.IndexOf('\n', _pos); 1052if (_pos < 0) 1057else if (_pos + 2 < _pattern.Length && _pattern[_pos + 2] == '#' && _pattern[_pos + 1] == '?' && _pattern[_pos] == '(') 1059_pos = _pattern.IndexOf(')', _pos); 1060if (_pos < 0) 1078Debug.Assert(_pos < _pattern.Length, "The current reading position must not be at the end of the pattern"); 1081switch (ch = _pattern[_pos]) 1132cc.AddCategoryFromName(ParseProperty(), ch != 'p', (_options & RegexOptions.IgnoreCase) != 0, _pattern, _pos); 1153Debug.Assert(_pos < _pattern.Length, "The current reading position must not be at the end of the pattern"); 1155int backpos = _pos; 1158char ch = _pattern[_pos]; 1164if (_pos + 1 < _pattern.Length) 1175if (!angled || _pos == _pattern.Length) 1180ch = _pattern[_pos]; 1185else if ((ch == '<' || ch == '\'') && _pos + 1 < _pattern.Length) 1190ch = _pattern[_pos]; 1199if (_pos < _pattern.Length && _pattern[_pos++] == close) 1216int pos = _pos - 1; 1225if (_pos == _pattern.Length || (ch = _pattern[_pos]) < '0' || ch > '9') 1265if (_pos < _pattern.Length && _pattern[_pos++] == close) 1287if (_pos == _pattern.Length) 1292char ch = _pattern[_pos]; 1294int backpos = _pos; 1299if (ch == '{' && _pos + 1 < _pattern.Length) 1303ch = _pattern[_pos]; 1322lastEndPos = _pos; 1325while (_pos < _pattern.Length && (ch = _pattern[_pos]) >= '0' && ch <= '9') 1339lastEndPos = _pos; 1351if (!angled || _pos < _pattern.Length && _pattern[_pos++] == '}') 1363if (_pos < _pattern.Length && _pattern[_pos++] == '}') 1418int startpos = _pos; 1420while (_pos < _pattern.Length) 1429return _pattern.Substring(startpos, _pos - startpos); 1436int c = Math.Min(3, _pattern.Length - _pos); 1439for (i = 0; c > 0 && (uint)(d = _pattern[_pos] - '0') <= 7; c -= 1) 1462while (_pos < _pattern.Length && (uint)(d = (char)(_pattern[_pos] - '0')) <= 9) 1482if (_pos + c <= _pattern.Length) 1508if (_pos == _pattern.Length) 1533for (bool off = false; _pos < _pattern.Length; _pos++) 1535char ch = _pattern[_pos]; 1620if (_pos + 2 >= _pattern.Length) 1631int startpos = _pos; 1632while (_pos < _pattern.Length) 1642string capname = _pattern.Substring(startpos, _pos - startpos); 1644if (_pos == _pattern.Length || _pattern[_pos++] != '}') 1674while (_pos < _pattern.Length) 1676int pos = _pos; 1681if (_pos < _pattern.Length) 1707if (_pos + 1 < _pattern.Length && _pattern[_pos + 1] == '#' && _pattern[_pos] == '?') 1716if (_pos < _pattern.Length && _pattern[_pos] == '?') 1721if (_pos + 1 < _pattern.Length && (_pattern[_pos] == '<' || _pattern[_pos] == '\'')) 1726ch = _pattern[_pos]; 1748if (_pos < _pattern.Length) 1750if (_pattern[_pos] == ')') 1756else if (_pattern[_pos] == '(') 1976Debug.Assert(_pos < _pattern.Length, "The current reading position must not be at the end of the pattern"); 1978int startpos = _pos; 1986int nChars = _pattern.Length - _pos; 2112new RegexParseException(error, _pos, SR.Format(SR.MakeException, _pattern, _pos, message));