package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?i)<div\s\w{5}=\"print[^>]*?>[\s\S]*?<\/div>`)
var str = `<div class="print">
<a href="javascript:window.print();" title="Print denne side"><span class="print-btn icon">P</span> Print denne side</a>
</div>
<div source="">
<div>`
var substitution = ""
fmt.Println(re.ReplaceAllString(str, substitution))
}
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/