#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)(skip-if-active=")([^"]+)(")"
Local $sString = "<script skip-if-active="facebook-for-woocommerce/facebook-for-woocomerce.php">" & @CRLF & _
" !(function (f, b, e, v, n, t, s) {" & @CRLF & _
" if (f.fbq) return;" & @CRLF & _
" n = f.fbq = function () {" & @CRLF & _
" n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments);" & @CRLF & _
" };" & @CRLF & _
" if (!f._fbq) f._fbq = n;" & @CRLF & _
" n.push = n;" & @CRLF & _
" n.loaded = !0;" & @CRLF & _
" n.version = "2.0";" & @CRLF & _
" n.queue = [];" & @CRLF & _
" t = b.createElement(e);" & @CRLF & _
" t.async = !0;" & @CRLF & _
" t.src = v;" & @CRLF & _
" s = b.getElementsByTagName(e)[0];" & @CRLF & _
" s.parentNode.insertBefore(t, s);" & @CRLF & _
" })(window, document, "script", "https://connect.facebook.net/de_DE/fbevents.js");" & @CRLF & _
" fbq("init", "{{fbPixelId}}");" & @CRLF & _
" fbq("track", "PageView");" & @CRLF & _
"</script>" & @CRLF & _
"<noscript><img height="1" width="1" alt="" style="display: none;" src="https://www.facebook.com/tr?id={{fbPixelId}}&ev=PageView&noscript=1" /></noscript>"
Local $sSubst = ""
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
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 AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm