This is a case for Regular Expressions (RegEx):
REReplaceNoCase(answer, '(#search_string#)', 'span
class=keyword\1/span', 'all')#
Heh, just seen this after the other thread, so guess I'll repeat what I said
there:
Using parentheses is completely unnecessary. Use \0 in the replacement string
I have a search results pages and I'd like to highlight the search term to show
the matches. Of course, search is not case sensitive.
On the results I can do something like:
Better written results: #ReplaceNoCase(answer, search_string,span
class=keyword search_string /span,all)#
This is a case for Regular Expressions (RegEx):
REReplaceNoCase(answer, '(#search_string#)', 'span
class=keyword\1/span', 'all')#
1. Search the content of the variable answer
2. Look for the content of the variable search_string
2a. Because parenthesis are being used and we're doing RegEx, the
# REReplaceNoCase(answer, '(#search_string#)', 'span
class=keyword\1/span', 'all')#
Nice. Works perfectly. Thank You...
just waiting for someone to complain about the nested ##'s though LOL :-)
Robert Harrison
Director of Interactive Services
Austin Williams
Advertising I Branding I
Stop nesting #s!! You're needlessly killing kittens!!!
:D
#reReplaceNoCase( answer, search_string, 'span class=keyword\1/span',
'all' )#
;-)
On Wed, Jun 27, 2012 at 1:51 PM, Robert Harrison rob...@austin-williams.com
wrote:
# REReplaceNoCase(answer, '(#search_string#)', 'span
On Wed, Jun 27, 2012 at 2:51 PM, Robert Harrison rob...@austin-williams.com
wrote:
# REReplaceNoCase(answer, '(#search_string#)', 'span
class=keyword\1/span', 'all')#
Nice. Works perfectly. Thank You...
just waiting for someone to complain about the nested ##'s though LOL :-)
'('
Stop nesting #s. You're needlessly killing kittens!!!
I was sooo waiting for that shoe to drop :-)
Robert Harrison
Director of Interactive Services
Austin Williams
Advertising I Branding I Digital I Direct
125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788
T 631.231.6600 X 119 F
I hope you noticed that I posted that _because_ you said you were waiting
on it. ;-)
On Wed, Jun 27, 2012 at 2:08 PM, Robert Harrison rob...@austin-williams.com
wrote:
Stop nesting #s. You're needlessly killing kittens!!!
I was sooo waiting for that shoe to drop :-)
Robert Harrison
Twitter: http://www.twitter.com/austin_williams
-Original Message-
From: Matt Quackenbush [mailto:quackfu...@gmail.com]
Sent: Wednesday, June 27, 2012 3:37 PM
To: cf-talk
Subject: Re: Replace Question
I hope you noticed that I posted that _because_ you said you were waiting
# REReplaceNoCase(answer, '(#search_string#)', 'span
class=keyword\1/span', 'all')#
This works so wonderfully, I hate to ask a follow-up question, but I have to.
Is there a way I can apply this everywhere EXCEPT when the matching content is
in an HTML tag (like an HREF tag)?
Sorry,
-williams.com]
Sent: Wednesday, June 27, 2012 1:30 PM
To: cf-talk
Subject: RE: Replace Question
I have a search results pages and I'd like to highlight the search term to
show the matches. Of course, search is not case sensitive.
On the results I can do something like:
Better written results
11 matches
Mail list logo