package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)^(([Rr]ef|[Cc]loses|[Rr]elated|[Ff]ixes|[Pp]artial)(:|) (#\d+|\w+\#\d+|(https://|)gitlab.com/volterra/.*/issues/\d+))|noref$`)
var str = `ref #629
Ref #629
ref specification#629
Ref specification#629
ref https://gitlab.com/volterra/ves.io/specifications/-/issues/629
Ref https://gitlab.com/volterra/ves.io/specifications/-/issues/629
ref gitlab.com/volterra/ves.io/specifications/-/issues/629
Ref gitlab.com/volterra/ves.io/specifications/-/issues/629
ref: #629
Ref: #629
ref: specification#629
Ref: specification#629
ref: https://gitlab.com/volterra/ves.io/specifications/-/issues/629
Ref: https://gitlab.com/volterra/ves.io/specifications/-/issues/629
ref: gitlab.com/volterra/ves.io/specifications/-/issues/629
Ref: gitlab.com/volterra/ves.io/specifications/-/issues/629
closes #629
Closes #629
closes specification#629
Closes specification#629
closes https://gitlab.com/volterra/ves.io/specifications/-/issues/629
Closes https://gitlab.com/volterra/ves.io/specifications/-/issues/629
closes gitlab.com/volterra/ves.io/specifications/-/issues/629
Closes gitlab.com/volterra/ves.io/specifications/-/issues/629
closes: #629
Closes: #629
closes: specification#629
Closes: specification#629
closes: https://gitlab.com/volterra/ves.io/specifications/-/issues/629
Closes: https://gitlab.com/volterra/ves.io/specifications/-/issues/629
closes: gitlab.com/volterra/ves.io/specifications/-/issues/629
Closes: gitlab.com/volterra/ves.io/specifications/-/issues/629
related #629
Related #629
related specification#629
Related specification#629
related https://gitlab.com/volterra/ves.io/specifications/-/issues/629
Related https://gitlab.com/volterra/ves.io/specifications/-/issues/629
related gitlab.com/volterra/ves.io/specifications/-/issues/629
Related gitlab.com/volterra/ves.io/specifications/-/issues/629
related: #629
Related: #629
related: specification#629
Related: specification#629
related: https://gitlab.com/volterra/ves.io/specifications/-/issues/629
Related: https://gitlab.com/volterra/ves.io/specifications/-/issues/629
related: gitlab.com/volterra/ves.io/specifications/-/issues/629
Related: gitlab.com/volterra/ves.io/specifications/-/issues/629
fixes #629
Fixes #629
fixes specification#629
Fixes specification#629
fixes https://gitlab.com/volterra/ves.io/specifications/-/issues/629
Fixes https://gitlab.com/volterra/ves.io/specifications/-/issues/629
fixes gitlab.com/volterra/ves.io/specifications/-/issues/629
Fixes gitlab.com/volterra/ves.io/specifications/-/issues/629
fixes: #629
Fixes: #629
fixes: specification#629
Fixes: specification#629
fixes: https://gitlab.com/volterra/ves.io/specifications/-/issues/629
Fixes: https://gitlab.com/volterra/ves.io/specifications/-/issues/629
fixes: gitlab.com/volterra/ves.io/specifications/-/issues/629
Fixes: gitlab.com/volterra/ves.io/specifications/-/issues/629
partial #629
Partial #629
partial specification#629
Partial specification#629
partial https://gitlab.com/volterra/ves.io/specifications/-/issues/629
Partial https://gitlab.com/volterra/ves.io/specifications/-/issues/629
partial gitlab.com/volterra/ves.io/specifications/-/issues/629
Partial gitlab.com/volterra/ves.io/specifications/-/issues/629
partial: #629
Partial: #629
partial: specification#629
Partial: specification#629
partial: https://gitlab.com/volterra/ves.io/specifications/-/issues/629
Partial: https://gitlab.com/volterra/ves.io/specifications/-/issues/629
partial: gitlab.com/volterra/ves.io/specifications/-/issues/629
Partial: gitlab.com/volterra/ves.io/specifications/-/issues/629
noref
`
for i, match := range re.FindAllString(str, -1) {
fmt.Println(match, "found at index", i)
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Golang, please visit: https://golang.org/pkg/regexp/