How do you escape a dot in a /usr/local/go/src/cmd/go/testdata/script pattern

43 views
Skip to first unread message

Gert

unread,
Dec 17, 2019, 8:38:52 PM12/17/19
to golang-nuts
https://go-review.googlesource.com/c/go/+/201857/7/src/cmd/go/testdata/script/doc.txt

go test cmd/go -run=Script/^doc$

I guess this fails because of a dot located in the pattern 'go doc <sym>[.<methodOrField>]' 

How do you escape it?

Gert

unread,
Dec 17, 2019, 9:20:57 PM12/17/19
to golang-nuts
never mind, just plain regex \[ \.
Reply all
Reply to author
Forward
0 new messages