Why not make this `Pattern.compile("git@(.+):([^/]+)/([^/]+)(?:\\.git)")` and avoid the need for a second set of patterns?