From 40e24a942bce7b10e23a7282e673ac8a758ca378 Mon Sep 17 00:00:00 2001 From: Jinwook Jeong Date: Mon, 1 Nov 2021 23:46:47 +0900 Subject: [PATCH] regexp: fix typo in the overview MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Run-TryBot: Ian Lance Taylor Trust: Daniel Martí --- src/regexp/regexp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/regexp/regexp.go b/src/regexp/regexp.go index f975bb3894..7d56bd6b8e 100644 --- a/src/regexp/regexp.go +++ b/src/regexp/regexp.go @@ -46,7 +46,7 @@ // the match of the first parenthesized subexpression, and so on. // // If 'Index' is present, matches and submatches are identified by byte index -// pairs within the input string: result[2*n:2*n+1] identifies the indexes of +// pairs within the input string: result[2*n:2*n+2] identifies the indexes of // the nth submatch. The pair for n==0 identifies the match of the entire // expression. If 'Index' is not present, the match is identified by the text // of the match/submatch. If an index is negative or text is nil, it means that -- 2.48.1