MCPcopy Create free account
hub / github.com/coregx/coregex / FindStringSubmatchIndex

Method FindStringSubmatchIndex

regex.go:682–684  ·  view source on GitHub ↗

FindStringSubmatchIndex returns the index pairs for the leftmost match and capture groups. Same as FindSubmatchIndex but for strings.

(s string)

Source from the content-addressed store, hash-verified

680// FindStringSubmatchIndex returns the index pairs for the leftmost match
681// and capture groups. Same as FindSubmatchIndex but for strings.
682func (r *Regex) FindStringSubmatchIndex(s string) []int {
683 return r.FindSubmatchIndex(stringToBytes(s))
684}
685
686// FindAllIndex returns a slice of all successive matches of the pattern in b,
687// as index pairs [start, end].

Calls 2

FindSubmatchIndexMethod · 0.95
stringToBytesFunction · 0.85