正则表达式匹配<script></script>标签之间的内容

//C#代码
//private static Regex regexJs = new Regex("(?<=<script(.*?)>)(.|\n)*?(?=</script>)", RegexOptions.IgnoreCase);
//測試證明,這個好用些
private static Regex regexJs = new Regex("(?<=<script(.)*?>)([\\s\\S](?!<script))*?(?=</script>)", RegexOptions.IgnoreCase);

本文转载:CSDN博客