One way to do this is kinda a round about way. Use the Split function to
split the string into an array, and count the number of array elements,
minus one.
Dim arElem
Dim myString
Dim mySubString
myString = "this contains the word how many times just one time"
mySubString = "how many times"
arElem = Split(myString, mySubString)
Response.Write("Number of times: " & UBound(arElem))
You could also use the InStr function, and loop through the first ring to
count number of times the string appears.
--
Manohar Kamath
Editor, .netBooks
www.dotnetbooks.com
lot!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!