Match¶
Contains match data for a combination of a regex and a subject.
Public Functions¶
size¶
Returns the capture size of the match.
Returns¶
- U32 val
start_pos¶
Returns the character position of the first character in the match.
Returns¶
- USize val
end_pos¶
Returns the character position of the last character in the match.
Returns¶
- USize val
apply[optional A: ((String iso | Array[U8 val] iso) & Seq[U8 val] iso)]¶
Returns a capture by number. Raises an error if the index is out of bounds.
Parameters¶
- i: U32 val
Returns¶
- A^ ?
find[optional A: ((String iso | Array[U8 val] iso) & Seq[U8 val] iso)]¶
Returns a capture by name. Raises an error if the named capture does not exist.
fun box find[optional A: ((String iso | Array[U8 val] iso) & Seq[U8 val] iso)](
name: String box)
: A^ ?
Parameters¶
- name: String box
Returns¶
- A^ ?
groups¶
Returns all of the captured subgroups. Groups that failed to capture anything will contain the empty string.
Returns¶
dispose¶
Free the underlying PCRE2 data.
Returns¶
- None val