```ruby
irb(main):001:0> r=%r{git@(?<host>.*?)(?<port>:\d+)?/(?<username>.*)/(?<project_name>.*)\.git}
=> /git@(?<host>.*?)(?<port>:\d+)?\/(?<username>.*)\/(?<project_name>.*)\.git/
irb(main):002:0> "git@git.corp.squareup.com:sq/dashboard.git" =~ r
=> nil
```

The slash is only a slash with `ssh://` prefix. It's a colon otherwise.