How about enabling "dot matches all" and using something simple:
<script\b[^>]*>(.*?)</script>
Remember that matching is not the same as capturing. This should capture ($1) what's in between the tags. I did a quick test using http://regexpal.com/
Using bosinski.com/regex in Eclipse (I know it's not C#) here's my test file (followed by results):
<html>
<SCRIPT LANGUAGE="JavaScript"><!--
function demoMatchClick() {
var re = new RegExp(document.demoMatch.regex.value);
if (document.demoMatch.subject.value.match(re)) {
alert("Successful match");
} else {
alert("No match");
}
}
// -->
</SCRIPT>
<script language="fred">
this is the second set of code
</script>
</html>
Results of the regex match:
Found 2 match(es):
start=8, end=275
Group(0) = <SCRIPT LANGUAGE="JavaScript"><!--
function demoMatchClick() {
var re = new RegExp(document.demoMatch.regex.value);
if (document.demoMatch.subject.value.match(re)) {
alert("Successful match");
} else {
alert("No match");
}
}
// -->
</SCRIPT>
Group(1) = <!--
function demoMatchClick() {
var re = new RegExp(document.demoMatch.regex.value);
if (document.demoMatch.subject.value.match(re)) {
alert("Successful match");
} else {
alert("No match");
}
}
// -->
start=277, end=344
Group(0) = <script language="fred">
this is the second set of code
</script>
Group(1) =
this is the second set of code