M
mike
Hello, I am trying to write some code to parse a sentence and hyperlink
just the words in it. I used Aaron's code from an earlier question as
a start.
So far, all the code does below is hyperlink everything separated by a
space, which means stuff like "work." "happy." "Well;" "not." from the
sentence become hyperlinks (whereas im interested in just the words
themselves becoming hyperlinks and the punctuation staying
nonhyperlinks). Anyone know how to do it?
sentence = "If only this would work, I would be happy. Well; maybe
not."
qwords = split(sentence)
for j = 0 to ubound (qwords)
response.write "<a href=""default.asp?q="
response.write qwords(j)
response.write """>"
response.write qwords(j)
response.write "</a> "
next
just the words in it. I used Aaron's code from an earlier question as
a start.
So far, all the code does below is hyperlink everything separated by a
space, which means stuff like "work." "happy." "Well;" "not." from the
sentence become hyperlinks (whereas im interested in just the words
themselves becoming hyperlinks and the punctuation staying
nonhyperlinks). Anyone know how to do it?
sentence = "If only this would work, I would be happy. Well; maybe
not."
qwords = split(sentence)
for j = 0 to ubound (qwords)
response.write "<a href=""default.asp?q="
response.write qwords(j)
response.write """>"
response.write qwords(j)
response.write "</a> "
next