Beispiel #1
0
        /// <summary>
        ///   Captures - Find the extent of the capturing groups in the pattern
        ///   in a given haystack.
        /// </summary>
        /// <param name="haystack">The string to search for this pattern</param>
        /// <param name="offset">The offset to start searching at</param>
        public Captures Captures(byte[] haystack, uint offset)
        {
            var caps    = new Captures(this, haystack);
            var matched = RureFfi.rure_find_captures(Raw,
                                                     haystack,
                                                     new UIntPtr((uint)haystack.Length),
                                                     new UIntPtr(offset),
                                                     caps.Raw);

            caps.Matched = matched;
            return(caps);
        }