Hi,
Does anybody know how I would go about using asp vbscript functions to find the first occurrence of a word/s within a string. Then pull out the sentence that the string exists within. I have done some work with splitting strings up into arrays to find the item but am unsure of how I would get back to the start of the sentence after the item has been found - hence I dont think I am doing the most effective solution. Can anybody help with this?
For example
<%
dim str,search
str = "xxxxxxxxxxx.hello please help me to do this. this is tricky but Im sure it can be done efficiently. Thanks.xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
search = "tricky"
%>
So I may try to look for the search string within the str, but would like to return
this is tricky but Im sure it can be done efficiently
Many thanks in advance
JimFl
Does anybody know how I would go about using asp vbscript functions to find the first occurrence of a word/s within a string. Then pull out the sentence that the string exists within. I have done some work with splitting strings up into arrays to find the item but am unsure of how I would get back to the start of the sentence after the item has been found - hence I dont think I am doing the most effective solution. Can anybody help with this?
For example
<%
dim str,search
str = "xxxxxxxxxxx.hello please help me to do this. this is tricky but Im sure it can be done efficiently. Thanks.xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
search = "tricky"
%>
So I may try to look for the search string within the str, but would like to return
this is tricky but Im sure it can be done efficiently
Many thanks in advance
JimFl