diff --git a/lib/git_url.rb b/lib/git_url.rb index d1980a94de7..f991d585c2c 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)