日期:2014-05-18 浏览次数:20559 次
dim result as string
dim strposi as string ‘高亮显示
Dim matchesregex As New Regex("[color=#FF0000].{0,20}[/color]" & keyword(j) & "[color=#FF0000].{0,20}[/color]", RegexOptions.IgnoreCase Or RegexOptions.Multiline)
Dim matchesfound As MatchCollection
Dim matchmade As Match
matchesfound = matchesregex.Matches(strcontent)
For Each matchmade In matchesfound
strposi = strposi & matchmade.Value
strposi = Replace(strposi, keyword(j), "<font color=#C60A00>" & keyword(j) & "</font> ")
Next
result = result & strposi