FindAllStringIndex returns a slice of all successive matches of the pattern in s, as index pairs [start, end]. If n > 0, it returns at most n matches. If n <= 0, it returns all matches. Example: re := coregex.MustCompile(`\d+`) indices := re.FindAllStringIndex("1 2 3", -1) // indices = [[0,1],
(s string, n int)
| 775 | // indices := re.FindAllStringIndex("1 2 3", -1) |
| 776 | // // indices = [[0,1], [2,3], [4,5]] |
| 777 | func (r *Regex) FindAllStringIndex(s string, n int) [][]int { |
| 778 | return r.FindAllIndex(stringToBytes(s), n) |
| 779 | } |
| 780 | |
| 781 | // ReplaceAllLiteral returns a copy of src, replacing matches of the pattern |
| 782 | // with the replacement bytes repl. |