From 0fbf4bb3ae339f62c9cd52d9b47b5cbe0b573f0f Mon Sep 17 00:00:00 2001 From: Theodore Kokkoris Date: Thu, 13 Jun 2013 10:17:38 +0300 Subject: [PATCH] Escaped regexp dots --- github/project.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/github/project.go b/github/project.go index e7fc18e3..cdcdda1b 100644 --- a/github/project.go +++ b/github/project.go @@ -61,17 +61,17 @@ func parseOwnerAndName(remote string) (owner string, name string) { } func mustMatchGitHubURL(url string) ([]string, error) { - httpRegex := regexp.MustCompile("https://github.com/(.+)/(.+?)(.git|$)") + httpRegex := regexp.MustCompile("https://github\.com/(.+)/(.+)(\.git|$)") if httpRegex.MatchString(url) { return httpRegex.FindStringSubmatch(url), nil } - readOnlyRegex := regexp.MustCompile("git://github.com/(.+)/(.+?)(.git|$)") + readOnlyRegex := regexp.MustCompile("git://github\.com/(.+)/(.+)(\.git|$)") if readOnlyRegex.MatchString(url) { return readOnlyRegex.FindStringSubmatch(url), nil } - sshRegex := regexp.MustCompile("git@github.com:(.+)/(.+?)(.git|$)") + sshRegex := regexp.MustCompile("git@github\.com:(.+)/(.+)(\.git|$)") if sshRegex.MatchString(url) { return sshRegex.FindStringSubmatch(url), nil }