CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 case sensitive replace function

Print topic Send  topic

Author Message
deepskyblue.co.uk
Posted: 10/29/2002, 6:41 AM

I have got a variation on the highlight search keyword function:

article = rs2("article_content")
if keyword <> "" then
string_to_split = keyword
tok = split(string_to_split, " ")
for i = 0 to ubound(tok) step 1
article = replace(article, tok(i), "<font color = red>"& tok(i) &"</font>")
next
end if

However this function only replaces the keyword if the case is the same, even though the search displays results regardless of case.


I.e. a search for "Prime Time"

returns "....prime time recruitment are the uk's leading recruitment....."

but the "prime time" part is not highlighted.... if it returned

"....Prime Time recruitment are the uk's leading recruitment....."

then it would be highlighted.....

Any ideas, thanks in advance

Paul
deepskyblue.co.uk
Posted: 10/29/2002, 6:45 AM

Sorry i forgot to say i am using ASP+mySQL if that helps

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.