package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?s)<table class="clubs">(.*?)</table>`)
var str = `<div class="box" style="padding:0px;">
<div class="box-heading" align="center" style="padding-top:2px; height:15px;">OUR CLUBS</div>
<div class="box-content" style="padding:0px 10px 0px 10x;margin:0px;">
<table class="clubs">
<tr>
<td width="11%" align="center" height="130"><a href="https://myticketsonline.eu/Everton-tickets" rel="nofollow"><img src="image/data/everton.jpg" border="0" width="57"><br><br>
<span class="candara_bold" style="font-size:15px;color:#265da0;">Everton</span></a>
<td width="11%" align="center" height="130"><a href="https://myticketsonline.eu/Manchester-United-Tickets" rel="nofollow"><img src="image/clubs/manchester-united.jpg" border="0" width="57"><br><br>
<span class="candara_bold" style="font-size:15px;color:#f20000;">Man United</span></a></td>
<td width="11%" align="center" height="130"><a href="https://myticketsonline.eu/Chelsea" rel="nofollow"><img src="image/clubs/chelsea.jpg" border="0" width="57"><br><br>
<span class="candara_bold" style="font-size:15px;color:#003487;">Chelsea</span></a></td>
<td width="11%" align="center" height="130"><a href="https://myticketsonline.eu/Arsenal" rel="nofollow"><img src="image/clubs/arsenal.jpg" border="0" width="57"><br><br>
<span class="candara_bold" style="font-size:15px;color:#d70127;">Arsenal</span></a></td>
<td width="11%" align="center" height="130"><a href="https://myticketsonline.eu/Manchester-City" rel="nofollow"><img src="image/clubs/manchester-city.jpg" border="0" width="57"><br><br>
<span class="candara_bold" style="font-size:15px;color:#177389;">Man City</span></a></td>
<td width="11%" align="center" height="130"><a href="https://myticketsonline.eu/Liverpool" rel="nofollow"><img src="image/clubs/liverpool.jpg" border="0" width="57"><br><br>
<span class="candara_bold" style="font-size:15px;color:#ba0109;">Liverpool</span></a></td>
<td width="11%" align="center" height="130"><a href="https://myticketsonline.eu/Tottenham-hotspur-tickets" rel="nofollow"><img src="image/data/tottenham.jpg" border="0" width="57"><br><br>
<span class="candara_bold" style="font-size:15px;color:#102654;">Tottenham</span></a></td>
<td width="11%" align="center" height="130"><a href="https://myticketsonline.eu/barcelona" rel="nofollow"><img src="image/data/barcela.jpg" border="0" width="57"><br><br>
<span class="candara_bold" style="font-size:15px;color:#a20045;">Barcelona</span></a></td>
<td width="11%" align="center" height="130"><a href="https://myticketsonline.eu/real-madrid" rel="nofollow"><img src="image/data/realmadrid.jpg" border="0" width="57"><br><br>
<span class="candara_bold" style="font-size:15px;color:#17377f;">Real Madrid</span></a></td></tr>
</table>
</div>
</div>`
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/