package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)\b([A-Za-z]+\s*\([A-Z]+\)|[A-Z]+)(\s*-\d+[A-Z]+(?:,*\s*-\d+[A-Z]*)*|\s*-\d+(?:,*\s*-\d+)*)(?:,*\s*and\s+(-\d+))?`)
var str = `The Proteinase-Activated Receptor-2 interskin (IS)-1ALPHA, -8, -97, -2ALPHA, and -3 was specific antagonist. The LL-37, -15, SAC-1, -7, and -21 in keratinocytes was good.`
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/