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:
ReplaceNoCase(answer, search_string,span
class=keyword#search_string#/span,all)#
This puts a nice little
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
Anyone have any idea why this code will not strip out the spaces in the
string N0P 2L0?
select Replace(postal_code,' ', '') from location where id = 1009637
when I change the last argument to 'X' it throws two X's in like it should.
We are running ms sql 2k in 6.5 compatibility mode, so I dont
Well, I tested this and it works fine on a 2k db NOT running in
compatability mode, so that is the issue. Now to find a workaround.
-Original Message-
From: John Stanley
Sent: Friday, February 04, 2005 11:35 AM
To: CF-Talk
Subject: OT:SQL Replace Question
Anyone have any idea why
PROTECTED]]
Sent: Wednesday, May 10, 2000 11:33 AM
To: [EMAIL PROTECTED]
Subject: RE: A replace question
Remove "..\" this way:
cfif string CONTAINS "..\"
cfset string = Replace(string, "..\", "", "All")
/cfif
Serving MP3's on the we
Well, as long as they're not Metallica MP3's ...:)
-Original Message-
From: Holger Lockertsen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 10, 2000 12:33 PM
To: [EMAIL PROTECTED]
Subject: RE: A replace question
Remove "..\" this way:
cfif string CONTAINS "..\"
How can I dynamically convert:
d:\songs\..\drip\manual.txt
to:
d:\drip\manual.txt
or:
d:\Songs\Music\K\..\B\Buffett, Jimmy\Song.mp3
to:
d:\Songs\Music\B\Buffett, Jimmy\Song.mp3
?
I'm having a complete brain lapse!
Russel Madere, Jr.
Web Developer
TurboSquid
"Be good and you will be
Only copyrighted ones =-p
.Todd
- Original Message -
From: "Holger Lockertsen" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, May 10, 2000 12:33 PM
Subject: RE: A replace question
| Remove "..\" this way:
|
| cfif string CONTAINS "..\"
|
MAIL PROTECTED]
Sent: Wednesday, May 10, 2000 11:45 AM
Subject: A replace question
How can I dynamically convert:
d:\songs\..\drip\manual.txt
to:
d:\drip\manual.txt
or:
d:\Songs\Music\K\..\B\Buffett, Jimmy\Song.mp3
to:
d:\Songs\Music\B\Buffett, Jimmy\Song.mp3
?
I'm having a
Nedre Slottsgate 5, N-0157 OSLO, Noreg/Norway
* 23 31 03 04 / 91 83 20 51
* [EMAIL PROTECTED] http://www.horisont.no/
NB! Horisont har fått nye nummer, og mitt INTERNNUMMER er: 23 31 03 04
-Original Message-
From: Russel Madere [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 10, 2000 5:4
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
-- =_NextPart_001_01BFBAD3.69F193EE
Content-Type: text/plain
Subject: A replace question
How can I dynamically convert:
d:\songs\..\drip\manual.txt
I solved the problem. What I did was create a includable file
act_DirectoryClean.cfm which contains:
=
cfset deleteAt = ListFind(list, "..", "\")
cfset list = ListDeleteAt(list, "#deleteAt#", "\")
cfset
22 matches
Mail list logo