Skip to content

Commit 40e24a9

Browse files
zzJinuxmvdan
authored andcommitted
regexp: fix typo in the overview
Correct the slice expression in the description of Index functions. Change-Id: I97a1b670c4c7e600d858f6550b647f677ef90b41 Reviewed-on: https://go-review.googlesource.com/c/go/+/360058 Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Trust: Daniel Martí <[email protected]>
1 parent fd2e1e7 commit 40e24a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/regexp/regexp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
// the match of the first parenthesized subexpression, and so on.
4747
//
4848
// If 'Index' is present, matches and submatches are identified by byte index
49-
// pairs within the input string: result[2*n:2*n+1] identifies the indexes of
49+
// pairs within the input string: result[2*n:2*n+2] identifies the indexes of
5050
// the nth submatch. The pair for n==0 identifies the match of the entire
5151
// expression. If 'Index' is not present, the match is identified by the text
5252
// of the match/submatch. If an index is negative or text is nil, it means that

0 commit comments

Comments
 (0)