public bool MoveNext()
            {
                if (_regex == null)
                {
                    return(false);
                }

                if (!_match.IsInitialized)
                {
                    _match = _regex.CreateRefMatch();
                    _match.FirstMatch(_subject, _settings, _settings.StartIndex);
                }
                else
                {
                    _match.NextMatch(_settings);
                }

                if (_match.Success)
                {
                    return(true);
                }

                _regex = null;
                return(false);
            }
 internal RefMatchEnumerator(InternalRegex regex, ReadOnlySpan <char> subject, PcreMatchSettings settings)
 {
     _regex    = regex;
     _subject  = subject;
     _settings = settings;
     _match    = default;
 }