all: replace [0-9] with \d in regexps

1. replace [0-9] with \d in regexps
2. replace [a-zA-Z0-9_] with \w in regexps

Change-Id: I9e260538252a0c1071e76aeb1c5f885c6843a431
GitHub-Last-Rev: 286e1a4619
GitHub-Pull-Request: golang/go#54874
Reviewed-on: https://go-review.googlesource.com/c/go/+/428435
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
This commit is contained in:
TomCao New Macbook Pro 2022-09-27 04:18:15 +00:00 committed by Gopher Robot
parent 550864e5d2
commit fac5338a6c
17 changed files with 23 additions and 23 deletions

View file

@ -520,7 +520,7 @@ func writeProducerSec(ctxt *ld.Link) {
writeSecSize(ctxt, sizeOffset)
}
var nameRegexp = regexp.MustCompile(`[^\w\.]`)
var nameRegexp = regexp.MustCompile(`[^\w.]`)
// writeNameSec writes an optional section that assigns names to the functions declared by the "func" section.
// The names are only used by WebAssembly stack traces, debuggers and decompilers.