Added comments explaining what a Match is

posixStyleMatching
Aadhavan Srinivasan 1 month ago
parent fd102292c6
commit c88ebd1aa5

@ -5,7 +5,12 @@ import (
"sort" "sort"
) )
// a Match stores a slice of all the capturing groups in a match. // A Match represents a match found by the regex in a given string.
// It is represented as a list of [Group]s, where the nth element contains
// the indices matched by the nth capturing group. The element at index 0 is known
// as the 0-group, and represents the contents of the entire match.
//
// See [Regex.FindSubmatch] for an example.
type Match []Group type Match []Group
// a Group represents a group. It contains the start index and end index of the match // a Group represents a group. It contains the start index and end index of the match

Loading…
Cancel
Save