package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)((\bprostat)(?=\w{0,3}\b))`)
var str = `/*ITALIAN*/
Neoformazione del palato duro in paziente affetto da ca della prostata.
Frustoli agoboptici di parenchima prostatico.
Il complesso dei reperti orienta in prima ipotesi per localizzazione di carcinoma di origine prostatica.
Agobiopsie prostatiche multiple
Ipertrofia prostatica.
/*ENGLISH*/
New formation of the hard palate in a patient affected by prostate cancer.
Fragments showing hypertrophic prostate parenchyma.
The combination of findings suggests a preliminary diagnosis of prostate-origin carcinoma.
Multiple prostatic core biopsies.
Prostatic hypertrophy.`
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/