第二次提问 ASP正则问题
<meta http-equiv=Content-Type content=text/html;charset=gb2312><meta http-equiv=Content-Type content="text/html;charset=gb2312"><meta http-equiv=Content-Type content="text/html;charset=gb2312"/><meta http-equiv=Content-Type content=‘text/html;charset=gb2312’/>
<script language="vbscript">Dim str, re, rvstr = "<meta http-equiv=Content-Type content=text/html;charset=gb2312>"str = "<meta http-equiv=Content-Type content=""text/html;charset=gb2312"">"str = "<meta http-equiv=Content-Type content=""text/html;charset=gb2312""/>"str = "<meta http-equiv=Content-Type content=‘text/html;charset=gb2312’/>"str = "<meta charset=""UTF-8"" />"Set re = New RegExpre.Pattern = "<meta[^>]+charset=[""]?([\w\-]+)[^>]*>"re.Global = Truere.IgnoreCase = Truere.MultiLine = TrueSet matches = re.Execute(str)if matches.Count>0 then msgbox matches(0).SubMatches(0)end if</script>