If you're using just plain text, it is rather simple:
- Read the whole text into a string variable,
- Search each of the words using string.indexOf() as much as required,
store the indices (+string length) found into a sorted array or anything.
- Go through the array in reverse order and add your tags to the string
at the appropriate places,
- Output the string using Response.Write();
However, it becomes quite complicated if the text contains formatting. In that case I suppose you look for an appropriate control helping you in searching/editing the text portion of the data. There's an IE control providing a HTML-DOM and an XML control (MSXML) providing an XML-DOM.
Axel Dahmen
----------------------
"Stephajn Craig" <s.*****@NOSPAMfunsunvacations.com> schrieb im Newsbeitrag news:ea**************@TK2MSFTNGP11.phx.gbl...
Would I have to do this on a word by word basis? For instance, if I split
all of the words into a giant array using a space as a delimiter, and then
loop down through the array finding a match?
And might this work if the content isn't coming from a file, but instead
from a database?
--
Stephajn Craig