You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: main.go
    path of file: ./repos/cockroach/pkg/cmd/label-merged-pr
    
    the code of the file until where you have to start completion: // Copyright 2021 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in acc
    
func matchVersion(text string) string {
	for _, line := range strings.Fields(text) {
		// Only looking for version tags.
		regVersion := regexp.MustCompile(`^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)`)
		if !regVersion.MatchString(line) {
			continue
		}
		// Should avoid *-alpha.00000000 tag, so we continue with the next line value.
		alpha00Regex := regexp.MustCompile(`v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)-alpha.00+$`)
		if alpha00Regex.MatchString(line) {
			continue
		}
		// Checking first for An alpha/beta/rc tag.
		// if present, return line value
		alphaBetaRcRegex := regexp.MustCompile(`^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)-[-.0-9A-Za-z]+$`)
		if alphaBetaRcRegex.MatchString(line) {
			return line
		}
		// Second check is vX.Y.Z patch release >= .1 is first (ex: v20.1.1).
		patchRegex := regexp.MustCompile(`^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.[1-9][0-9]*$`)
		if patchRegex.MatchString(line) {
			return line
		}
		// Third check is major release A vX.Y.0 release.
		majorReleaseRegex := regexp.MustCompile(`^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.0$`)
		if majorReleaseRegex.MatchString(line) {
			return line
		}
	}
	return ""
}