Ask a Question related to ASP, Design and Development.
-
Mark Tait #1
Text Replace function
Hi - I'm using the replace function to hilite search words in text which
is returned. However, as the text which is being searched also includes
HTML, I find sometimes that the HTML tags can be replaced, which in turn
messes up the text which is dieplayed.
Is there any way of checking only text which does not appear between <>
tags?
eg.
myText="<img src='bob.gif'>bob"
mySearch="bob"
replace(myText,mySearch,"<b>" & mySearch & "</b>")
...this will end up:
myText="<img src='<b>bob</b>.gif'><b>bob</b>"
Has anyone any ideas?
Many thanks,
Mark Tait
[email]mark@fixitks.co.uk[/email]
[url]www.fixitks.co.uk[/url]
Knowledge Management Solutions
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Mark Tait Guest
-
Replace function
Please help, I want to replace a string within field in a table with a nother string. I am using the replace function but I am doing something... -
Trouble using Replace() function in CFN file
I don't do much scripting in coldfusion besides some of the very basics for trasfering info from the database, so I'm not sure how to write this....... -
Problem with VB replace function for CRLF...I think
I'm not sure if this is the best place for this post, sorry if it is not... Here is what I am doing: I have created a small kbase (SQL db)... -
Search & Replace Function?
I have some textfield that users will enter data into on my web site and then I'll use php and write it to mysql - for security purposes, is there... -
Using Replace function to remove two different characters
I'm using replace function to strip 0s from a particular string: <%=replace(rs1("racelength"),"0","''"%> but I need to also strip empty spaces... -
Evertjan. #2
Re: Text Replace function
Mark Tait wrote on 03 jul 2003 in
microsoft.public.inetserver.asp.general:
This replace is not a good idea.> Hi - I'm using the replace function to hilite search words in text
> which is returned. However, as the text which is being searched also
> includes HTML, I find sometimes that the HTML tags can be replaced,
> which in turn messes up the text which is dieplayed.
>
> Is there any way of checking only text which does not appear between
> <> tags?
>
> eg.
>
> myText="<img src='bob.gif'>bob"
> mySearch="bob"
>
> replace(myText,mySearch,"<b>" & mySearch & "</b>")
>
> ..this will end up:
>
> myText="<img src='<b>bob</b>.gif'><b>bob</b>"
>
> Has anyone any ideas?
>
do something with:
txt.select();
like in:
<http://www.javascripter.net/faq/searchin.htm>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Evertjan. Guest



Reply With Quote

