package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)(skip-if-active=")([^"]+)(")`)
var str = `<script skip-if-active="facebook-for-woocommerce/facebook-for-woocomerce.php">
!(function (f, b, e, v, n, t, s) {
if (f.fbq) return;
n = f.fbq = function () {
n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments);
};
if (!f._fbq) f._fbq = n;
n.push = n;
n.loaded = !0;
n.version = "2.0";
n.queue = [];
t = b.createElement(e);
t.async = !0;
t.src = v;
s = b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t, s);
})(window, document, "script", "https://connect.facebook.net/de_DE/fbevents.js");
fbq("init", "{{fbPixelId}}");
fbq("track", "PageView");
</script>
<noscript><img height="1" width="1" alt="" style="display: none;" src="https://www.facebook.com/tr?id={{fbPixelId}}&ev=PageView&noscript=1" /></noscript>`
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/