using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"<\s*?script\s*?([^>]*)\s*?>\s*?(.+)?\s*?<\s*?\/script\s*?>";
string input = @"< script type=""text/javascript"" src=""//vk.com/js/api/openapi.js?65""> < /script >
<script type=""text/javascript"" >
VK.init({apiId: 3251711, onlyWidgets: true});
</script>
<script type=""text/javascript"" src=""http://keddr.com/wp-content/themes/keddr3-1/js/lite-youtube.js"" ></script>
<script type=""text/javascript"" src=""http://keddr.com/wp-content/themes/keddr3-1/js/jquery.complexify.js"" > sfdbb </script>
<script type=""text/javascript"" >
$(function () {
if (($(""#pass1"").length 0)) {
$(""#pass1"").complexify({}, function (valid, complexity) {
if (complexity < 1) {
$('#progress').css({'width': complexity + '%'}).removeClass('progressbarValidGood').addClass('progressbarInvalid');
$('.passAlert').hide();
} else if (complexity > 1 && complexity < 40) {
$('#progress').css({'width': complexity + '%'}).removeClass('progressbarValidGood').addClass('progressbarInvalid');
$('.passAlert.good').hide();
$('.passAlert.bad').fadeIn();
} else if (complexity > 40) {
$('#progress').css({'width': complexity + '%'}).removeClass('progressbarValidGood').addClass('progressbarValid');
$('.passAlert.good').hide();
$('.passAlert.strong').fadeIn();
}
$('#complexity').html(Math.round(complexity) + '%');
});
}
});
</script >";
RegexOptions options = RegexOptions.Singleline;
foreach (Match m in Regex.Matches(input, pattern, options))
{
Console.WriteLine("'{0}' found at index {1}.", m.Value, m.Index);
}
}
}
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