package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)^((?:.+?, .+?;)*?(?:[^;\s]+?, .+?)\.)([^;]+?\.).*$`)
var str = `DI MAIO, P. The Missing Pragmatic Link in the Semantic Web. Business Intelligence Advisory Service Executive Update. v. 8, n. 7, 2008.
ECO, U. Lector in Fabula: la cooperación interpretativa en el texto narrativo. Barcelona: Lumen, 1987
ECO, U. O conceito de texto. São Paulo: T. A. Q. /EDUSP, 1984.
ECO, U. Obra aberta: forma e indeterminação nas poéticas contemporâneas. São Paulo: Perspectiva, 1988.
ECO, U. Os limites da interpretação. São Paulo: Pioneira, 2000.
EDMONDS, B. The Pragmatic Roots of Context. In: PROC. OF THE 2ND INTERNATIONAL AND INTERDISCIPLINARY CONFERENCE ON MODELING AND USING CONTEXT. Berlin; Heidelberg; New York, v. 1688, 1999. Anais… v. 1688, p. 119-132, 1999.
BERNERS-LEE, T. Semantic Web Concepts. 2005a. Disponível em: http://www.w3.org/2005/Talks/0517-boit-tbl. Acesso em: 25 set. 2014
BERNERS-LEE, T. Web for real people. 2005b. Disponível em . Acesso em: 25 set. 2014.
BERNERS-LEE, T.; CAILLIAU, R. WorldWideWeb: Proposal for a HyperText Project. 1990. Disponível em: < http://www.w3.org/Proposal.html >. Acesso em: 13 out. 2014.
BERNERS-LEE, T.; HENDLER, J.; LASSILA, O. The semantic web: a new form of web content that is meaningful to computers will unleash a revolution of new possibilities. New York: Scientific American, 2001. Disponível em: http://www.sciam.com/2001/050lissue/0501berners-lee.html. Acesso em: 13 out. 2014.`
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/