package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?mi)https:\/\/(?:(?:accounts|my)\.tase\.co\.il|maya\.tase\.co\.il\/(?:reports\/(?:mymessages|favorites)|account\/notification)|info\.tase\.co\.il\/Management\/GeneralPages\/Pages\/(?:PersonalFolder|Registration|Change_Password|UsersSearchIndex|Security%20Search)\.aspx).*`)
var str = `https://my.tase.co.il
https://accounts.tase.co.il
https://maya.tase.co.il/reports/mymessages
https://maya.tase.co.il/reports/favorites
https://maya.tase.co.il/account/notification
https://info.tase.co.il/Management/GeneralPages/Pages/PersonalFolder.aspx
https://info.tase.co.il/Management/GeneralPages/Pages/Registration.aspx
https://info.tase.co.il/Management/GeneralPages/Pages/Change_Password.aspx
https://info.tase.co.il/Management/GeneralPages/Pages/UsersSearchIndex.aspx
https://info.tase.co.il/Management/GeneralPages/Pages/Security%20Search.aspx`
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/