Match
struct Matchimport Match from Wax;A successful regular-expression match retaining its source string and capture positions. Public offsets and lengths count UTF-8 bytes. Group zero is the whole match; unmatched groups are represented separately from matched empty groups.
Members
indexgetter
public get index() : int32The zero-based byte offset of the whole match.
lengthgetter
public get length() : int32The UTF-8 byte length of the whole match, which may be zero.
valuegetter
public get value() : StringSliceBorrows the matched bytes as a string slice.
groupCountgetter
public get groupCount() : int32The number of capture slots, including slot zero for the whole match.
GroupAtmethod
public fn GroupAt(int32 idx) : RegexGroupReturns a capture by an in-range zero-based index; out-of-range indices panic. An unmatched
capture has isMatch == false, index -1, and length zero.
GroupNamedmethod
public fn GroupNamed(string name) : RegexGroupReturns a named capture. Unknown or unmatched names produce a nonmatching group with empty value.
ToStringmethod
public fn ToString() : stringProvided by the compiler.
ToStringBuffermethod
public fn ToStringBuffer(StringBuilder builder) : int32Provided by the compiler.