package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?mi)<select name="ctl00\$ContentPlaceHolder1\$UrunListesi\$ctrl([0-9]{1,2})\$StokBoyut" id="ctl00_ContentPlaceHolder1_UrunListesi_ctrl([0-9]{1,2})_StokBoyut">([\s\S]*?)<\/select>`)
var str = `<select name="ctl00$ContentPlaceHolder1$UrunListesi$ctrl0$StokBoyut" id="ctl00_ContentPlaceHolder1_UrunListesi_ctrl0_StokBoyut">
<option value="900061_50x80">50x80 Stok:0</option>
<option value="900067_60x110">60x110 Stok:0</option>
<option value="900037_70x140">70x140 Stok:0</option>
<option value="356593_80 T.Yolluk">80 T.Yolluk Stok:2</option>
<option value="356552_80x150">80x150 Stok:23</option>
</select>
`
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/