using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(skip-if-active="")([^""]+)("")";
string substitution = @"";
string input = @"<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>";
RegexOptions options = RegexOptions.Multiline;
Regex regex = new Regex(pattern, options);
string result = regex.Replace(input, 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 C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx