if (instr(1, sdata,"<meta ", 1)=1 and instr(7, sdata, "name=""keywords""", 1)>6) then
Set regEx = New RegExp
regEx.Pattern = "content=""(.+?)"""
regEx.IgnoreCase = True
Set matches = regEx.Execute(sdata)
if matches.Count > 0 then
KeywordAl = matches(0).SubMatches(0)
end if
end if
你可以尝试这样的事情:
meta = "<meta name=""keywords"" content=""Software AG, Altenkesseler Straße 17, Saarbrücken, Saarland, software ag, Ofis"" />"
if InStr( meta, "content=" ) > 0 then
arrMeta = Split( meta, "content=" )
keywords = arrMeta( 1 ) ''-- your data will be in the 2nd row of the array
keywords = Trim( Replace( Replace( Replace( keywords, """", "" ), "/>", "" ), "name=keywords", "" ) )
end if
Response.Write keywords