• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Difficult Keyword Replace Function

New Here ,
Feb 28, 2008 Feb 28, 2008

Copy link to clipboard

Copied

I am trying to figure out a way to markup text results that have a search term in it (see: Google, Yahoo, etc). The problem I'm having with the replacenocase function is that the original text loses its case...which I don't want.

For example...

If someone searches for the keyword "coldfusion" and the following text is as follows...

Original Text

1. ColdFusion Tutorial

With Markup

1. <strong>coldfusion</strong> Tutorial

Since the user typed in lower case coldfusion...I lose the case when doing a replacenocase function.

Any way around this without having to do a replace with every possible case combination?
TOPICS
Advanced techniques

Views

259

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 28, 2008 Feb 28, 2008

Copy link to clipboard

Copied

LATEST
i have seen jquery plugins that do that, for sure, and possible a udf at
cflib.org

yep, here: http://cflib.org/udf.cfm?ID=133

and maybe this one can help, too: http://cflib.org/udf.cfm?ID=721


Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation