package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)[\w_.-]{1,}$`)
var str = `sdsd<<sdsdsd/LES-DARKNETS_EXTREMITES-D-UN-RESEAU-AMBIANT_Vincent-Bonnefille_2015_lowdef.pdf`
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/