>This is a case for Regular Expressions (RegEx):
>
>REReplaceNoCase(answer, '(#search_string#)', 'class="keyword">\1', '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
ins
-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 re
> > # REReplaceNoCase(answer, '(#search_string#)', '
> > class="keyword">\1', '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, but th
.com/blog
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 on
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 wrote:
>
> > Stop nesting #s. You're needlessly killing kittens!!!
>
> I was sooo waiting for that shoe to drop :-)
>
> Robert Harrison
> Director of Interacti
> 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 63
On Wed, Jun 27, 2012 at 2:51 PM, Robert Harrison wrote:
>
> > # REReplaceNoCase(answer, '(#search_string#)', ' class="keyword">\1', 'all')#
>
> Nice. Works perfectly. Thank You...
>
> just waiting for someone to complain about the nested ##'s though LOL :-)
>
'(' & search_string & ')'
I drop a
Stop nesting #s!! You're needlessly killing kittens!!!
:D
#reReplaceNoCase( answer, search_string, '\1',
'all' )#
;-)
On Wed, Jun 27, 2012 at 1:51 PM, Robert Harrison wrote:
>
> > # REReplaceNoCase(answer, '(#search_string#)', ' class="keyword">\1', 'all')#
>
> Nice. Works perfectly. Than
> # REReplaceNoCase(answer, '(#search_string#)', ' class="keyword">\1', '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 Digital I
This is a case for Regular Expressions (RegEx):
REReplaceNoCase(answer, '(#search_string#)', '\1', '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 matched
text will be 'ca
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,"" & search_string & "","all")#
This puts a nice l
replace(mystring, '"', "", "all")
ie use single quotes for the attribute string wrapper
On 3/01/2012 14:28, Les Irvin wrote:
>
> I'm trying to use replace() to edit a string with double quotation
> marks in it. For example, I want to change:
>
> this is "fubar"
>
> to
>
> this is fubar
>
> But
You double em. So to replace ", you use "".
On Mon, Jan 2, 2012 at 9:28 PM, Les Irvin wrote:
>
> I'm trying to use replace() to edit a string with double quotation
> marks in it. For example, I want to change:
>
> this is "fubar"
>
> to
>
> this is fubar
>
> But I can't seem to figure out how t
t; there are few who decide to do
> something about them now. Not
> tomorrow. Not next week. But today.
> The true entrepreneur is a doer.
>
>
> On Fri, May 6, 2011 at 9:54 PM, andy matthews wrote:
>
>>
>> Simplest thing to do would be to put the cfhttp call into a cfc,
Are you sending it back to the browser as Json? I would be more inclined to
do that, and remove the serialise json from the JavaScript. Then you will be
able to do what you are wanting to do.
Regards,
Andrew Scott
http://www.andyscott.id.au/
> From: David Mineer Jr [mailto:min...@gmail.com]
> Sent: Friday, May 06, 2011 7:53 PM
> To: cf-talk
> Subject: Re: Replace cfhttp with jquery.post()
>
>
> K, hold up. This has something to do with the ip address of the calling
> function. This program can only be called
Simplest thing to do would be to put the cfhttp call into a cfc, then call
that from jQuery.
andy
-Original Message-
From: David Mineer Jr [mailto:min...@gmail.com]
Sent: Friday, May 06, 2011 7:53 PM
To: cf-talk
Subject: Re: Replace cfhttp with jquery.post()
K, hold up. This has
The cfhttp portion works from the same page. And for the program it uses
You have to define the ip addresses that it listens on, so of course your
options are limited there. It is only for an internal app, but building it
like everything else using CF is what works best for me.
---
David Mineer
If the page you are trying to call is not web accessible then that indeed
would be your problem, can;t you just put in the same folder as the rest of
the site so that you can call it from Jquery ?
On Sat, May 7, 2011 at 1:59 AM, Justin Scott wrote:
>
> > This program can only be called from th
> This program can only be called from the local server i.e.
> localhost. cfhttp must call from localhost and so it works.
You could easily write a little CF-based form post proxy that would
take in the request and re-post it internally and pass the results
back to the client.
-Justi
K, hold up. This has something to do with the ip address of the calling
function. This program can only be called from the local server i.e.
localhost. cfhttp must call from localhost and so it works. jQuery.post()
must call from the client ip address and therefore won't ever work.
So I bette
Nice catch. I also had address2 instead of addressline2. I changed those
and still nothing.
I get the code pasted above for the post info when I click on the link, but
the response info is blank. That's what has me flustered. I get nothing
back. The link turns red and I can alert that there
Not sure if it's just and oversight, but you've got "address" in the
CFHTTP version and "address1" in the jQ version.
As for the error, don't you get the response struct in Firebug if you
click on the URL?
On 5/6/2011 6:11 PM, David Mineer Jr wrote:
> I am trying to replace this:
>
> http://l
ListQualify("bob,carol,ted,alice", '"')
On Fri, Apr 8, 2011 at 2:21 PM, Les Irvin wrote:
>
> How can I convert this string:
>
> "bob,carol,ted,alice"
>
> to this:
>
> "bob","carol","ted","alice"
>
> my replace() skills are not up to snuff...
>
> many thanks,
> Les
>
>
ah i found the prob.
put this at top of function:
and the rereplace becomes:
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.hou
ok, i have made an attempt at converting a php function. unfortunately it does
not quite work. i think i am close ??
hi, just wondering if anyone had some ideas on how to do the above function?
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffus
(Tried sending this last night, but HoF is broken, so I'll try sending
it via the e-mail route...)
Firstly, you should be using cfqueryparam!
Always always always use cfqueryparam when you have #hashed# variables
inside queries, especially when those variables ultimately come from
the user.
Ne
You need to wrap the replace in #s
Sent from my iPhone
On Apr 4, 2009, at 4:41 PM, "BobSharp" wrote:
>
> Table has a Primary Key of DealerCode (UUID)
> A form POSTs the required key ( form.txtDealer ) to be picked up
> by the Details Update page.
>
>
> My scripting for the Update Detail
Strings need single quotes in SQL:
WHERE Replace(d.DealerCode,'-','','all') = '#matchDealer#'
However, you must use cfqueryparam for any user provided input:
WHERE Replace(d.DealerCode,'-','','all') =
mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/
2009/4/5
And of course I just realized that the error your seeing is in the
replace bit, so the other stuff was an error waiting to happen.
Are you trying to use the MySQL replace function or the CF replace function?
mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/
2009/
>> >
>
>I was INCORRECT.. replaceLIST() cannot REMOVE characters.. bummer
well, it actually looks like there IS a trick (which I used and didn't realize
it).
if you code in directly in source code form, then you cannot provide for
deletes..
if you code the in and out strings as strings, then
> >
> > I found that if the output list contains ,, for a particular entry
> in
> > the input list, this entry is SKIPPED and the output list REDUCED
> in
> > size.. if there is a SPACE char at least, then all is ok.
> >
> > OR do you need actual replaces near the front and deletes near the
>
> I found that if the output list contains ,, for a particular entry in
> the input list, this entry is SKIPPED and the output list REDUCED in
> size.. if there is a SPACE char at least, then all is ok.
>
> OR do you need actual replaces near the front and deletes near the
> back? I'll try
> Interesting use of Regex there. I actually thought that couldn't be
> done with Regex but you proved me wrong (not hard to do). What's your
> take on the speed difference between the two options? Neglible?
I would definitely go with what you find more readable. :)
--
s. isaac dealey ^ new ep
Dammit. Forgot about insert(). Oh well, that's why we have encapsulation. ;)
On Wed, Nov 5, 2008 at 12:56 PM, Andy Matthews <[EMAIL PROTECTED]> wrote:
> Working on it on my own, and this is the closest thing that I can come up
> with:
>
>
>
>
>
>
>
>#str# (len: #Len(str)#)
>
TED]
Sent: Wednesday, November 05, 2008 2:57 PM
To: cf-talk
Subject: Re: Replace specific character in a string
No but there are a couple of options...
string = rereplace(string,"^(.{6}).(.*)$","\1$\2")
or
string = insert("$",removechars(string,7,1),7)
If you do thi
Working on it on my own, and this is the closest thing that I can come up
with:
#str# (len: #Len(str)#)
#res# (len: #Len(res)#)
Anyone else have a better method?
-Original Message-
From: Andy Matthews [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 05, 2008 2
> How might I go about replacing a specific character in a
> string with another character? I'd like to get a random position in
> a string, then replace that specific character with something else.
>
> So I might start with: 'XX' (10 characters)
> I'd get a random position in that string
CF doesn't have a built-in to do it, but it's not hard to write:
function replaceAt(string, index, char) {
if (index EQ 1) {
return char & removeChars(string, 1, 1);
} else {
return left(string, index - 1) & char & removeChars(string, 1,
index);
bject: Re: Replace comma in replace list
You can't supply an alternate delimiter to replaceList, unfortunately,
so that won't work.
cheers,
barneyb
On Wed, Jun 25, 2008 at 3:05 PM, Bobby Hartsfield <[EMAIL PROTECTED]>
wrote:
> Change your list delimiter so a comma isn'
>>after playing with regex for 2 hours.
Not bad. The average is at leat 6 hours ;-)
--
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.
~~
#x27;t be either/or... It must be &.
-Original Message-
From: Claude Schneegans [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 26, 2008 10:15 AM
To: CF-Talk
Subject: Re: Replace comma in replace list
>>How do I indicate a comma in a replace list so I can replace the comma?
rep
>>How do I indicate a comma in a replace list so I can replace the comma?
replaceList is not the right tool for this, and since you are replacing
all characters by the same one,
what you need is REReplace. ie : REReplace (MyString,
"[##""%/\\*?<>|:$.'&@,]", "_", "all")
Example:
a|a:a$a.a'a&[EM
Robert Harrison wrote:
> How do I indicate a comma in a replace list so I can replace the comma?
>
> Example:
>,/,\,*,?,<,>,|,:,$,.,',&,@,#chr(44)#",
> "_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_")#">
>
> chr(44) is the comma, but that doesn't work and neither does ,,.
You could use a differ
I don't know if you can do it with the ReplaceList function at all... But
you can wrap your var with a replace first..
Example:
,|,:,$,.,',&,@,#chr(44)#","_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_")#">
hope this helps.
-- Sam
On Wed, Jun 25, 2008 at 1:49 PM, Robert Harrison <[EMAIL PROTECTED]>
wro
You can't supply an alternate delimiter to replaceList, unfortunately,
so that won't work.
cheers,
barneyb
On Wed, Jun 25, 2008 at 3:05 PM, Bobby Hartsfield <[EMAIL PROTECTED]> wrote:
> Change your list delimiter so a comma isn't interpreted as a delimiter.
> Check out listChangeDelims() (or some
Change your list delimiter so a comma isn't interpreted as a delimiter.
Check out listChangeDelims() (or something like that)
..:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com
-Original Message-
From: Robert Harrison [mailto:[EMAIL PROTECTED]
Sent: Wednesday
I think you have to do it separately. So do your replaceList for
everything except comma, and then follow it up with a replace for just
the comma.
cheers,
barneyb
On Wed, Jun 25, 2008 at 1:49 PM, Robert Harrison
<[EMAIL PROTECTED]> wrote:
> How do I indicate a comma in a replace list so I can re
Sent: 27 March 2008 06:21
To: CF-Talk
Subject: Re: replace words in a string
remove quotes around the second argument?
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Will Swain wrote:
> Hi,
>
> It's been a long day, and my eyes are hurting. I had a bit of code,
> writte
remove quotes around the second argument?
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Will Swain wrote:
> Hi,
>
> It's been a long day, and my eyes are hurting. I had a bit of code, written
> a few years ago now, which pulled a set of words from a database and looked
> for any instan
> #Replace('form.description','"',"'","ALL")#">
Remove the quotes around form.description.
Dave Watts, CTO, Fig Leaf Software
~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
ht
remove the quotes around form.description
#Replace(form.description,'"',"'","ALL")#
Rick Sanders wrote:
> Hey list,
>
>
>
> I'm trying to replace double quotes for single quotes in a string using this
> syntax:
>
> #Replace('form.description','"',"'","ALL")#">
>
>
>
> However, it's givi
..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-Original Message-
From: Rick Sanders [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 13, 2007 9:25 AM
To: CF-Talk
Subject: Replace Syntax
Hey list,
I'm trying to replace double quotes for single quote
>>What am I doing wrong?
You are actually replacing quotes in the string 'form.description'
instead of variable form.description.
Just try #Replace(form.description,'"',"'","ALL")#
--
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/cust
You need the breaking "". Try this:
#Replace('form.description','""',"&rsquo","ALL")#">
Robert B. Harrison
Director of Interactive services
Austin & Williams
125 Kennedy Drive, Suite 100 Hauppauge NY 11788
T : 631.231.6600 Ext. 119
F : 631.434.7022
www.austin-williams.com
Great advertising can
replace(form.description
not
replace('form.description'...
form.description is the variable, 'form.description' is a string with
the name of the variable.
--Ben Doom
Rick Sanders wrote:
> Hey list,
>
>
>
> I'm trying to replace double quotes for single quotes in a string using this
> sy
Sweet! It worked, thanks!
Rick Sanders
Webenergy
Canada: 902-401-7689
USA: 919-799-9076
Canada: www.webenergy.ca
USA: www.webenergyusa.com
-Original Message-
From: Claude Schneegans [mailto:[EMAIL PROTECTED]
Sent: November-13-07 11:02 AM
To: CF-Talk
Subject: Re: Replace
#Replace(form.description,'"',"'","ALL")#
On Nov 13, 2007 9:25 AM, Rick Sanders <[EMAIL PROTECTED]> wrote:
> Hey list,
>
>
>
> I'm trying to replace double quotes for single quotes in a string using
> this
> syntax:
>
> #Replace('form.description','"',"'","ALL")#">
>
>
>
> However, it's giving ba
Remove the single quotes from form.description. You are treating it as a
string rather a variable
-Original Message-
From: Rick Sanders [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 13, 2007 9:25 AM
To: CF-Talk
Subject: Replace Syntax
Hey list,
I'm trying to replace double quotes
I Actually read it wrong anyway because I read it that every single space
within the string needed to be replaced with a dash, so three spaces next to
each other would be three dashes.
On 10/18/07, morgan l <[EMAIL PROTECTED]> wrote:
>
> Only if ending spaces were intended to be dashes, which I un
On 10/18/07, Aaron Rouse <[EMAIL PROTECTED]> wrote:
>
> I Actually read it wrong anyway because I read it that every single space
> within the string needed to be replaced with a dash, so three spaces next
> to
> each other would be three dashes.
That's starting to sound like a class homework as
Only if ending spaces were intended to be dashes, which I understood to not
be the case (as the original code would have done that, and was apparently
wrong, according to the original message).
On 10/18/07, Aaron Rouse <[EMAIL PROTECTED]> wrote:
>
> Problem with trim is it gets rid of the spaces t
Or, use the previously-mentioned regex to replace two or more
consecutive spaces with a hyphen.
M!ke
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 18, 2007 4:00 PM
To: CF-Talk
Subject: Re: Replace spaces with dashes
after turning all the
after turning all the spaces into dashes, you can do a while loop
looking for double dashes and turning them into single dashes...
-Original Message
-From: [EMAIL PROTECTED]
-Date: Oct 18, 2007 13:41
-To: "CF-Talk"
-Subj: Re: Replace spaces with dashes
-
-Problem with trim
@Everyone - Thanks for the help.
@Charlie - The regex worked perfect. Thanks for the help.
> I need to take a string and replace all the spaces with dashes. I
> tried using the replace function but I am having issues with strings
> that have multiple spaces next to each other and/or a space or
Problem with trim is it gets rid of the spaces that should have been turned
into dashes.
On 10/18/07, morgan l <[EMAIL PROTECTED]> wrote:
>
> Trim(String) will get rid of leading or trailing spaces. You may need a
> RegEx and use ReReplace() if you want to replace multiple connsecutive
> spaces wi
Its been a couple of years but I seem to recall once running into an issue
where replace would not replace everything in a similar fashion. I think
the solution at the time was to run the replace function again, so something
like However maybe used a regex for it, but might be worth trying the
d
Trim(String) will get rid of leading or trailing spaces. You may need a
RegEx and use ReReplace() if you want to replace multiple connsecutive
spaces with just a single dash though. RegEx is not my bag, so I can't help
with specifics.
On 10/18/07, Steve Sequenzia wrote:
>
> I need to take a string
On 10/18/07, Steve Sequenzia <[EMAIL PROTECTED]> wrote:
> I need to take a string and replace all the spaces with dashes. I tried using
> the replace function but I am having issues with strings that have multiple
> spaces next to each other and/or a space or spaces at the end. Here is what I
>
You missed one.
Wouldn't want to doom any kitten today :)
rereplace(rereplace(trim(form.mystring),""","""","all"),chr(13),"","all")
-Original Message-
From: Charlie Griefer [mailto:[EMAIL PROTECTED]
Sent: Frid
Harrison [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 24, 2007 11:42 AM
> To: CF-Talk
> Subject: RE: replace carriage returns
>
> How would I replace the carriage returns in a textarea entry with ?
>
> newstring='#REREPLACE("#REREPLACE("#Trim(form.mystring)#&
> How would I ignore inserting carriage returns is the carriage return
comes after a "", "", "", or ""?
If you're letting them enter HTML code, make them enter HTML with their own
tags and 's. Either you control it or they write html. It would be
a nightmare to mix the two.
Robert B. Harrison
Di
> and also God kills a kitty every time you overuse pound signs :)
E. Man, I knew there was a reason I worked so hard to get those # signs
out of my glossary link.
Robert B. Harrison
Director of Interactive services
Austin & Williams
125 Kennedy Drive, Suite 100 Hauppauge NY 11788
T : 631.23
he current text.
Thanks!
-Original Message-
From: Robert Harrison [mailto:[EMAIL PROTECTED]
Sent: Friday, August 24, 2007 11:42 AM
To: CF-Talk
Subject: RE: replace carriage returns
How would I replace the carriage returns in a textarea entry with ?
This will do carriage returns and q
t; -Original Message-
> From: Robert Harrison [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 24, 2007 11:42 AM
> To: CF-Talk
> Subject: RE: replace carriage returns
>
> How would I replace the carriage returns in a textarea entry with ?
>
> newstring='#REREPLA
Thank you, Robert. Exactly what I needed.
-Original Message-
From: Robert Harrison [mailto:[EMAIL PROTECTED]
Sent: Friday, August 24, 2007 11:42 AM
To: CF-Talk
Subject: RE: replace carriage returns
How would I replace the carriage returns in a textarea entry with ?
This will do
mp;chr(10),"","all")
replacenocase(text, chr(10),"","all")
replacenocase(text,chr(09)," ","all")
~Brad
-Original Message-
From: Charlie Griefer [mailto:[EMAIL PROTECTED]
Sent: Friday, August 24, 2007 11:38 AM
To: CF-Talk
Subject:
How would I replace the carriage returns in a textarea entry with ?
This will do carriage returns and quotes to you can pass the data around in
forms. Keep in mind, however, if you stick into a DB and pull it back
to a form for edits later, you need to convert the back to carriage
returns. The
#replace(myTextAreaText, '#chr(13)&chr(10)#', '', 'all')#
On 8/24/07, Matthew Smith <[EMAIL PROTECTED]> wrote:
> How would I replace the carriage returns in a textarea entry with ?
>
>
>
>
~|
ColdFusion 8 - Build next generation
Casey,
Had a little quote issue. here's the code, actually tested a little...
]*href\s*="([^"]*)"[^>]*>[^<]*', '', "ALL")>
#htmlCodeFormat(fileContents)#
--
nathan strutz
http://www.dopefly.com/
On 2/2/07, Casey Dougall <[EMAIL PROTECTED]> wrote:
>
> holly cow, I typed that ***... Sorry
holly cow, I typed that crap... Sorry about that. I tried playing around
with what you typed but the statement is broken somewhere
The first post should have been.
FileName
Needs to turn into
Guess its time I sit down and get a better understanding of regular
expressions. BarF!!!
Casey
~~~
First off, I'm not sure what kind of HTML this is...
/SpecificDirectory
>
> /pathtofile.html
Normally it would be
Now here's what I would do...
]*href="([^"]*)"[^>]*>',
", "ALL")>
This is untested, but should work for normal HTML. You'll have to tweak it
if you want to use it with whatever y
Try doing a NON-greedy search by putting a ? After your selector:
REReplaceNoCase(
inputxml,
"]*>(.*?)<\/text>",
"",
"ONE"
)
Notice, (.*?) this should match the shortest possible string.
..
Ben Nadel
Certified Advanced ColdFusion MX7
Hmm... CF regex is known for being greedy, and I believe you need to append
a ? to make it not greedy. So try something like this
REReplaceNoCase(inputxml,"]*?>(.*?)<\/text>","")
Russ
> -Original Message-
> From: Markus Weber [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 05, 2006 9
If you need to read content from a URL, use cfhttp not cffile.
..:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 22, 2006 10:36 AM
To: CF-Talk
Subject: replace syntax issu
coldfusion.developer wrote:
> Why isn't this working?
>
> http://www.site.com/StoreLocator/Store_page.txt";
> variable="page_content">
The file attribute of cffile requires a path, not a URL.
> src="http://productlocator.site.com/productlocator/resources/9/KEGP/header_
> 02.gif" width="242"
http://productlocator.site.com/productlocator/resources/9/KEGP/header_02.gif";
width="242" height="75">, "")>
You need some quotes around your img string.
http://productlocator.site.com/productlocator/resources/9/KEGP/header_02.gif";
width="242" height="75">', "")>
--
Ian Skinner
It does look like it's supposed to be a carriage return, but the code is
expecting cr to be a variable, probably that has the carriage return
ASCII code in it. You could try "#chr(13)##chr(10)#" instead, or just
chr(10).
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PRO
On 11/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I reusing some code that uses replace to output data from a textbox datatype
> in SQL Server
> and I'm scratching my head on what "cr" is. Is that suppose to be a carriage
> return?
You probably had a variable called cr, something like
You need to add the parameter "All" as the scope in your Replace tag --
Replace(get_ing_img.sbclc_item, " ", "", "All")
That tells it to replace all occurrences rather than just the first one.
-- Josh
- Original Message -
From: <[EMAIL PROTECTED]>
To: "CF-Talk"
Sent: Monday, Octobe
That last argument should be "ALL".
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, October 02, 2006 11:38 AM
To: CF-Talk
Subject: replace function
I'm trying to replace any black spaces in a string with nothing, essentially
removing the black
space
There's a fourth argument, which says to either replace only the first instance
of the substring ("ONE"), or all instances of the substring ("ALL"). "ONE" is
the default. To replace all the spaces, you need
#Replace(get_ing_img.sbclc_itme, " ", "", "ALL)#
See the docs for more details.
> I'm
ReplaceList(myString,
> ",,", "Phone
> number changed from,to,")#
> -Original Message-
> From: S.Isaac Dealey [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 15 September 2005 2:46 a.m.
> To: CF-Talk
> Subject: Re: Replace String
> Hi Becky,
> What you&
Isaac you crazy guy!
#ReplaceList(myString, ",,", "Phone
number changed from,to,")#
-Original Message-
From: S.Isaac Dealey [mailto:[EMAIL PROTECTED]
Sent: Thursday, 15 September 2005 2:46 a.m.
To: CF-Talk
Subject: Re: Replace String
Hi Becky,
What you're
> I need to be able to search a string and make multiple
> replacements in
> it.
> For example, I have a string that is coming out of the
> database with
> weird characters
> 410-333-1234410-333-4321
> I want to replace with "Phone number changed from
> And I want to replace with "to"
> And simp
There are probably a number of ways to do this. Here's one:
(dbfield is your query results field that has the text in it)
","Phone number changed from ","all")
>
"," to ","all") >
","","all")>
If they are multiple possibilities of case, use replacenocase instead.
Dave
-Original Message--
for doing it better?
-Original Message-
From: Barney Boisvert [mailto:[EMAIL PROTECTED]
Sent: 25 August 2005 18:15
To: CF-Talk
Subject: Re: Replace or REReplace function question.
First, I'd recommend not using CF markup for the fields. Or at least
don't require the CFOUTPUT t
>>Does anyone have any suggestions/ideas on the best way to replace my
tags with the required text?
Have a look at CF_REextract here:
http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm?p=hf
It will allow you to get in a query all occurrences of
tags and what's in between
First, I'd recommend not using CF markup for the fields. Or at least
don't require the CFOUTPUT tags, just the hashes. If you have a small
number of fields, loop over them and just do a replace(string,
"##detail.firstname##", detail.firstname, "all") for each one. Not
real elegant, but it is sim
1 - 100 of 175 matches
Mail list logo