package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(\/(static)\/)(.*)([0-9]{13}\/)`)
var str = ` <link>http://static1.squarespace.com/static/56eadbb9e707eb1e1ec78cca/5743a5702b8dde05e892a971/59fa119a24a694d3151e9f79/1509632943781/medellin-flower-festival-colombia-conde-nast-traveller-1april14-rex_-1.jpg</link>
<title>attachment-59fa119a24a694d3151e9f79</title>
<img src="http://static1.squarespace.com/static/56eadbb9e707eb1e1ec78cca/5743a5702b8dde05e892a971/5a007536e4966b51e8d63db6/1509979480047/buenos-aires-unsettled-argentina-retreat-digital-nomad.jpgbuenos-aires-unsettled-argentina-retreat-digital-nomad?format=original" alt=""/>
<img src="http://static1.squarespace.com/static/56eadbb9e707eb1e1ec78cca/5743a5702b8dde05e892a971/5a007536e4966b51e8d63db6/1509979480047/buenos-aires-unsettled-argentina-retreat-digital-nomad.jpgbuenos-aires-unsettled-argentina-retreat-digital-nomad?format=original" alt=""/>
"http://static1.squarespace.com/static/56eadbb9e707eb1e1ec78cca/5743a5702b8dde05e892a971/59fa1b0b71c10b694346e433/1509563194043/22860715_372374486541985_6060851298842968064_n.jpg",`
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/