Replacing Strings

2007-11-01 Thread Rick Sanders
Hey list, I'm trying to replace a double quote in a text field to a single quote. I've tried using ReReplace, but it still crashes the Cold Fusion server. What I've done is this: cfoutput#REReplace(dills,,',ALL)#/cfoutput See, users tend to like using double quotes in a text field which

RE: Replacing Strings

2007-11-01 Thread Marius Milosav
Try: cfoutput#REReplace('dills','',',ALL)#/cfoutput Marius Milosav ScorpioSoft Corp. www.scorpiosoft.com -Original Message- From: Rick Sanders [mailto:[EMAIL PROTECTED] Sent: November 1, 2007 8:47 AM To: CF-Talk Subject: Replacing Strings Hey list, I'm trying to replace a double

RE: Replacing Strings

2007-11-01 Thread Andy Matthews
use single quotes in your replace function (and you don't need REReplace just FYI). REReplace('dills','',',ALL) -Original Message- From: Rick Sanders [mailto:[EMAIL PROTECTED] Sent: Thursday, November 01, 2007 7:47 AM To: CF-Talk Subject: Replacing Strings Hey list, I'm trying

Re: Replacing Strings

2007-11-01 Thread Kris Jones
ReReplace is for using a regular expression. Try Replace. You'll also need to quadruple the double quotes, something like this should work: #Replace(dills, , ', ALL)# That is, the content of each expression is enclosed in double quotes in this example. When the expression itself contains a

Re: Replacing Strings

2007-11-01 Thread Dana Kowalski
are you using cfqueryparam's on your query? It should escape them on its own I would think. ~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now

Re: Replacing Strings

2007-11-01 Thread Ben Doom
replace('dills', '', ', all) In other words, where you are explicitly writing double-quotes (like for the find string) wrap in single quotes, and where you are explicitly writing single quotes (like the replace string) wrap in double quotes. --Ben Doom Rick Sanders wrote: Hey list,

RE: Replacing Strings

2007-11-01 Thread Rick Sanders
:42 AM To: CF-Talk Subject: Re: Replacing Strings are you using cfqueryparam's on your query? It should escape them on its own I would think. ~| ColdFusion is delivering applications solutions at at top companies around

RE: Replacing Strings

2007-11-01 Thread Rick Sanders
Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: November-01-07 10:46 AM To: CF-Talk Subject: RE: Replacing Strings use single quotes in your replace function (and you don't need REReplace just FYI). REReplace('dills','',',ALL) -Original Message- From: Rick Sanders [mailto

Re: Replacing Strings

2007-11-01 Thread Ben Doom
-01-07 11:42 AM To: CF-Talk Subject: Re: Replacing Strings are you using cfqueryparam's on your query? It should escape them on its own I would think. ~| Download the latest ColdFusion 8 utilities including Report

Re: Replacing Strings

2007-11-01 Thread Charlie Griefer
On Nov 1, 2007 7:44 AM, Rick Sanders [EMAIL PROTECTED] wrote: Didn't think of that, but it's less code to do a replace than the cfqueryparam. the cfqueryparam buys you more. and you should be using it anyway. -- Charlie Griefer ...All the

RE: Replacing Strings

2007-11-01 Thread Rick Sanders
: 919-799-9076 Canada: www.webenergy.ca USA: www.webenergyusa.com -Original Message- From: Ben Doom [mailto:[EMAIL PROTECTED] Sent: November-01-07 12:10 PM To: CF-Talk Subject: Re: Replacing Strings Not to put too fine a point on it, but if this data is coming directly from

Re: Replacing Strings

2007-11-01 Thread Adam Haskell
! Kind regards, Rick Sanders Canada: 902-401-7689 USA: 919-799-9076 Canada: www.webenergy.ca USA: www.webenergyusa.com -Original Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: November-01-07 10:46 AM To: CF-Talk Subject: RE: Replacing Strings use single

RE: Replacing Strings

2007-11-01 Thread Rick Sanders
: Replacing Strings Bigger rookie mistake is not using cfqueryparam. Adam Haskell http://cfrant.blogspot.com On 11/1/07, Rick Sanders [EMAIL PROTECTED] wrote: Hi Andy, Thanks for your response. I can't believe I made the rookie mistake of not using single quotes instead of double quotes

RE: Replacing Strings

2007-11-01 Thread Bobby Hartsfield
be... not having to replace any kind of quotes. :-) ..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Adam Haskell [mailto:[EMAIL PROTECTED] Sent: Thursday, November 01, 2007 11:28 AM To: CF-Talk Subject: Re: Replacing Strings Bigger rookie

Re: Replacing Strings

2007-11-01 Thread James Holmes
USA: www.webenergyusa.com -Original Message- From: Ben Doom [mailto:[EMAIL PROTECTED] Sent: November-01-07 12:10 PM To: CF-Talk Subject: Re: Replacing Strings Not to put too fine a point on it, but if this data is coming directly from an end user, it would probably be in your

Re: Replacing strings as part of a query

2004-06-08 Thread Deanna Schneider
What database are you using? This sounds like something that would be best handled at the database level, instead of running it through CF. - Original Message - From: Richard Crawford Actually, my question about replacing special characters (thanks to all who answered, by the way) was

Re: Replacing strings as part of a query

2004-06-08 Thread Richard Crawford
Deanna Schneider wrote: What database are you using? This sounds like something that would be best handled at the database level, instead of running it through CF. Deanna, I'm using SQL Server 7.The problem is that the field with the characters to be replaced is a TEXT field, and you can't

Re: Replacing strings as part of a query

2004-06-08 Thread Deanna Schneider
Don't know SQL Server. Sorry. But, as for your 500 error - make sure that show friendly http errors is turned off in your IE preferences. Then, you should at least see more info. - Original Message - From: Richard Crawford Deanna Schneider wrote: What database are you using? This

Re: Replacing strings as part of a query

2004-06-08 Thread Richard Crawford
Deanna Schneider wrote: Don't know SQL Server. Sorry. But, as for your 500 error - make sure that show friendly http errors is turned off in your IE preferences. Then, you should at least see more info. That in itself isn't an issue (I don't use IE if I can possibly avoid it).I had hoped

Replacing strings as part of a query

2004-06-07 Thread Richard Crawford
Actually, my question about replacing special characters (thanks to all who answered, by the way) was part of a larger question.What I really need to do is select all rows of one table, modify the value of one field, and insert all of the rows, with that one modified field, into another table.

CFStudio and REGEXP.. Replacing strings that have diferent chars - a CFStudio tip

2001-07-04 Thread Charles Wilson
(this tip may help you) After struggling for a bit, found regular expressions could do what I wanted to do. My problem: Various files had varying strings in them, such as: This file's name is:P1000104 This file's name is:P1000109 This file's name is:P1000167 etc. I wanted to