예제 #1
0
        internal PcreMatch(string subject, InternalRegex regex, ref Native.match_result result, uint[] oVector)
        {
            // Real match

            Subject  = subject;
            _regex   = regex;
            _oVector = oVector;
            _markPtr = result.mark;

            _resultCode = result.result_code;
        }
예제 #2
0
        internal PcreDfaMatchResult(string subject, ref Native.match_result result, uint[] oVector)
        {
            // Real match

            Subject  = subject;
            _oVector = oVector;

            _resultCode = result.result_code;

            if (_resultCode > 0)
            {
                _matches = new PcreDfaMatch[_resultCode];
            }
            else if (_resultCode == 0)
            {
                _matches = new PcreDfaMatch[_oVector.Length / 2];
            }
            else
            {
                _matches = Array.Empty <PcreDfaMatch>();
            }
        }