host extractor more reliable without trailing )
Ted Unangst tedu@tedunangst.com
Wed, 29 Jul 2020 02:38:22 -0400
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
fun.go
→
fun.go
@@ -505,7 +505,7 @@ strings.ToLower(h[1:]), h)
} var re_unurl = regexp.MustCompile("https://([^/]+).*/([^/]+)") -var re_urlhost = regexp.MustCompile("https://([^/ #]+)") +var re_urlhost = regexp.MustCompile("https://([^/ #)]+)") func originate(u string) string { m := re_urlhost.FindStringSubmatch(u)