diff --git a/lib/git_url.rb b/lib/git_url.rb index 9410c1d3f86..90eefc0eb95 100644 --- a/lib/git_url.rb +++ b/lib/git_url.rb @@ -2,7 +2,7 @@ module GitUrl class << self - SSH_REGEXP = /(\w+@(\w+\.)*\w+):(.*)/ + SSH_REGEXP = /\A(\w+@\w+(\.\w+)*):(.*)\z/ def normalize(url) if m = SSH_REGEXP.match(url)