1 write to _pattern
System.Text.RegularExpressions (1)
System\Text\RegularExpressions\RegexParser.cs (1)
60_pattern = pattern;
168 references to _pattern
System.Text.RegularExpressions (168)
System\Text\RegularExpressions\RegexParser.cs (168)
279while (_pos < _pattern.Length) 292while (_pos < _pattern.Length && (!IsSpecialOrSpace(ch = _pattern[_pos]) || (ch == '{' && !IsTrueQuantifier()))) 297while (_pos < _pattern.Length && (!IsSpecial(ch = _pattern[_pos]) || (ch == '{' && !IsTrueQuantifier()))) 305if (_pos == _pattern.Length) 309else if (IsSpecial(ch = _pattern[_pos])) 332_unit = RegexNode.CreateOneWithCaseConversion(_pattern[endpos - 1], _options, _culture, ref _caseBehavior); 385if (_pos == _pattern.Length) 427if (_pos == _pattern.Length || !(isQuantifier = IsTrueQuantifier())) 434ch = _pattern[_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) 527_pos = _pattern.IndexOf('$', _pos); 530_pos = _pattern.Length; 535if (_pos < _pattern.Length) 564if (_pos < _pattern.Length && _pattern[_pos] == '^') 571if ((_options & RegexOptions.ECMAScript) != 0 && _pattern[_pos] == ']') 577for (; _pos < _pattern.Length; firstChar = false) 584if (_pos < _pattern.Length && _pattern[_pos] == '^') 591if ((_options & RegexOptions.ECMAScript) != 0 && _pos < _pattern.Length && _pattern[_pos] == ']') 596if (_pos >= _pattern.Length) 603ch = _pattern[_pos++]; 624if (_pos < _pattern.Length && _pattern[_pos] != ']') 637else if (ch == '\\' && _pos < _pattern.Length) 639switch (ch = _pattern[_pos++]) 649charClass!.AddDigit((_options & RegexOptions.ECMAScript) != 0, ch == 'D', _pattern, _pos); 687charClass!.AddCategoryFromName(ParseProperty(), ch != 'p', caseInsensitive, _pattern, _pos); 752else if (_pos + 1 < _pattern.Length && _pattern[_pos] == '-' && _pattern[_pos + 1] != ']') 759else if (_pos < _pattern.Length && ch == '-' && !translatedChar && _pattern[_pos] == '[' && !firstChar) 801if (_pos == _pattern.Length || _pattern[_pos] != '?' || (_pos + 1 < _pattern.Length && _pattern[_pos + 1] == ')')) 818if (_pos == _pattern.Length) 825char ch = _pattern[_pos++]; 855if (_pos == _pattern.Length) 860switch (ch = _pattern[_pos++]) 902if (_pos < _pattern.Length && !(_pattern[_pos] == close || _pattern[_pos] == '-')) 922if (_pos < _pattern.Length && !(_pattern[_pos] == close || _pattern[_pos] == '-')) 939if ((capnum != -1 || proceed) && _pos + 1 < _pattern.Length && _pattern[_pos] == '-') 942ch = _pattern[_pos]; 954if (_pos < _pattern.Length && _pattern[_pos] != close) 968if (_pos < _pattern.Length && _pattern[_pos] != close) 982if ((capnum != -1 || uncapnum != -1) && _pos < _pattern.Length && _pattern[_pos++] == close) 994if (_pos < _pattern.Length) 996ch = _pattern[_pos]; 1002if (_pos < _pattern.Length && _pattern[_pos++] == ')') 1018if (_capnames?[capname] is int tmpCapnum && _pos < _pattern.Length && _pattern[_pos++] == ')') 1029if (_pos + 2 < _pattern.Length && _pattern[_pos + 1] == '?') 1032if (_pattern[_pos + 2] == '#') 1038if (_pattern[_pos + 2] == '\'' || (_pos + 3 < _pattern.Length && _pattern[_pos + 2] == '<' && _pattern[_pos + 3] != '!' && _pattern[_pos + 3] != '=')) 1056if (_pos == _pattern.Length) 1061if ((ch = _pattern[_pos++]) == ')') 1090while (_pos < _pattern.Length && IsSpace(_pattern[_pos])) 1096if ((_options & RegexOptions.IgnorePatternWhitespace) != 0 && _pos < _pattern.Length && _pattern[_pos] == '#') 1098_pos = _pattern.IndexOf('\n', _pos); 1101_pos = _pattern.Length; 1104else if (_pos + 2 < _pattern.Length && _pattern[_pos + 2] == '#' && _pattern[_pos + 1] == '?' && _pattern[_pos] == '(') 1106_pos = _pattern.IndexOf(')', _pos); 1109_pos = _pattern.Length; 1125Debug.Assert(_pos < _pattern.Length, "The current reading position must not be at the end of the pattern"); 1128switch (ch = _pattern[_pos]) 1179cc.AddCategoryFromName(ParseProperty(), ch != 'p', (_options & RegexOptions.IgnoreCase) != 0, _pattern, _pos); 1200Debug.Assert(_pos < _pattern.Length, "The current reading position must not be at the end of the pattern"); 1205char ch = _pattern[_pos]; 1211if (_pos + 1 < _pattern.Length) 1214ch = _pattern[_pos++]; 1222if (!angled || _pos == _pattern.Length) 1227ch = _pattern[_pos]; 1232else if ((ch == '<' || ch == '\'') && _pos + 1 < _pattern.Length) 1237ch = _pattern[_pos]; 1246if (_pos < _pattern.Length && _pattern[_pos++] == close) 1272if (_pos == _pattern.Length || (ch = _pattern[_pos]) < '0' || ch > '9') 1312if (_pos < _pattern.Length && _pattern[_pos++] == close) 1334if (_pos == _pattern.Length) 1339char ch = _pattern[_pos]; 1346if (ch == '{' && _pos + 1 < _pattern.Length) 1350ch = _pattern[_pos]; 1372while (_pos < _pattern.Length && (ch = _pattern[_pos]) >= '0' && ch <= '9') 1398if (!angled || _pos < _pattern.Length && _pattern[_pos++] == '}') 1410if (_pos < _pattern.Length && _pattern[_pos++] == '}') 1467while (_pos < _pattern.Length) 1469if (!RegexCharClass.IsBoundaryWordChar(_pattern[_pos++])) 1476return _pattern.Substring(startpos, _pos - startpos); 1483int c = Math.Min(3, _pattern.Length - _pos); 1486for (i = 0; c > 0 && (uint)(d = _pattern[_pos] - '0') <= 7; c -= 1) 1509while (_pos < _pattern.Length && (uint)(d = (char)(_pattern[_pos] - '0')) <= 9) 1529if (_pos + c <= _pattern.Length) 1533char ch = _pattern[_pos++]; 1555if (_pos == _pattern.Length) 1560char ch = _pattern[_pos++]; 1580for (bool off = false; _pos < _pattern.Length; _pos++) 1582char ch = _pattern[_pos]; 1623char ch = _pattern[_pos++]; 1667if (_pos + 2 >= _pattern.Length) 1672char ch = _pattern[_pos++]; 1679while (_pos < _pattern.Length) 1681ch = _pattern[_pos++]; 1689string capname = _pattern.Substring(startpos, _pos - startpos); 1691if (_pos == _pattern.Length || _pattern[_pos++] != '}') 1721while (_pos < _pattern.Length) 1724char ch = _pattern[_pos++]; 1728if (_pos < _pattern.Length) 1754if (_pos + 1 < _pattern.Length && _pattern[_pos + 1] == '#' && _pattern[_pos] == '?') 1763if (_pos < _pattern.Length && _pattern[_pos] == '?') 1768if (_pos + 1 < _pattern.Length && (_pattern[_pos] == '<' || _pattern[_pos] == '\'')) 1773ch = _pattern[_pos]; 1795if (_pos < _pattern.Length) 1797if (_pattern[_pos] == ')') 1803else if (_pattern[_pos] == '(') 2005Debug.Assert(_pos < _pattern.Length, "The current reading position must not be at the end of the pattern"); 2008char ch = _pattern[startpos]; 2015int nChars = _pattern.Length - _pos; 2016while (--nChars > 0 && (uint)((ch = _pattern[++pos]) - '0') <= 9) ; 2033while (--nChars > 0 && (uint)((ch = _pattern[++pos]) - '0') <= 9) ; 2047_concatenation!.AddChild(RegexNode.CreateOneWithCaseConversion(_pattern[pos], isReplacement ? _options & ~RegexOptions.IgnoreCase : _options, _culture, ref _caseBehavior)); 2050case > 1 when (_options & RegexOptions.IgnoreCase) == 0 || isReplacement || !RegexCharClass.ParticipatesInCaseConversion(_pattern.AsSpan(pos, cch)): 2051_concatenation!.AddChild(new RegexNode(RegexNodeKind.Multi, _options & ~RegexOptions.IgnoreCase, _pattern.Substring(pos, cch))); 2055foreach (char c in _pattern.AsSpan(pos, cch)) 2141new RegexParseException(error, _pos, SR.Format(SR.MakeException, _pattern, _pos, message));