From c15942cc324310c2cbbfac41d33538442595408f Mon Sep 17 00:00:00 2001 From: Lan Tian Date: Fri, 30 Oct 2020 23:33:56 +0800 Subject: [PATCH] proxy: fix regex formatting error --- proxy/traceroute.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/traceroute.go b/proxy/traceroute.go index 85098b1..f85396b 100644 --- a/proxy/traceroute.go +++ b/proxy/traceroute.go @@ -68,7 +68,7 @@ func tracerouteHandler(httpW http.ResponseWriter, httpR *http.Request) { } if result != nil { errString = string(result) - errString = regexp.MustCompile(`\s*(\d*)\s*\*\n`).ReplaceAllStringFunc(errString, func(w string) string { + errString = regexp.MustCompile(`(?m)^\s*(\d*)\s*\*\n`).ReplaceAllStringFunc(errString, func(w string) string { skippedCounter++ return "" })