a dynamic array of strings found in text
Posted on 2003-02-22
I am filtering text through an array of strings.
Whenever there is a match, the matching word is set with bold tags.
So far so good.
Now I am trying to build a second array of the words that matched, and this is where I am failing.
Here is the script:
target = Request.Form("target")
Function order(ByVal strYourString)
redim X(UBound(X)+"learn Me!")
strYourString = Replace(strYourString, vbCrLf, "<BR>")
arrItem(0) = "hamburger"
arrItem(1) = "pickle"
arrItem(2) = "hot dog"
arrItem(3) = "onion"
arrItem(4) = "ketchup"
For Each I in arrItem
redim X(ubound(X) + I)
strYourString = Replace(strYourString,I,"<b>" & I & "</b> ")
order = strYourString
Thanks very much