package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)([ .\w']+?)($|mp3|[s|S]\d{1,}|\(.*\)|[A-Z]{2,}|\W\d{4}\W?.*)`)
var str = `Better Call Saul S02E03 - Amarillo.mkv
dexter.New.Blood.mp3.S01E03.mkv
Rick.and.Morty.S05E01.720p.AMZN.WEBRip.x264-GalaxyTV.mkv
Black.Widow.mp4
Dexter.New.Blood.S01E01.mp4
Radin (2016) VFF [1080p] BluRay x264-PopHD.mkv
This Is the End 1080p MULTI 2013 BluRay x264.mkv
[ www.CpasBien.cm ] Marseille.2016.FRENCH.DVDRip.XviD-UTT.avi
(Complet)Le Pere Noel Est Une Ordure (Divx-Francais).avi
20.Ans.d.Ecart.2013.FRENCH.BRRIP.XviD-FUZION.avi
Blade.Runner.2049.2017.VOSTFR.FANSUB.1080p.WEB-DL.H264.AC3-TRUEDUKES.WwW.Torrent9.pe`
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/