Re: Replace Question

2012-07-02 Thread Peter Boughton
>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

RE: Replace Question

2012-06-27 Thread Eric Roberts
-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

RE: Replace Question: Part II

2012-06-27 Thread Robert Harrison
> > # 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

RE: Replace Question

2012-06-27 Thread Robert Harrison
.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

Re: Replace Question

2012-06-27 Thread Matt Quackenbush
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

RE: Replace Question

2012-06-27 Thread Robert Harrison
> 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

Re: Replace Question

2012-06-27 Thread Michael Dinowitz
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

Re: Replace Question

2012-06-27 Thread Matt Quackenbush
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

RE: Replace Question

2012-06-27 Thread Robert Harrison
> # 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 

Re: Replace Question

2012-06-27 Thread Michael Dinowitz
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

RE: Replace Question

2012-06-27 Thread Robert Harrison
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

Re: Replace double quotations

2012-01-02 Thread Kym Kovan
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

Re: Replace double quotations

2012-01-02 Thread Raymond Camden
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

Re: Replace cfhttp with jquery.post()

2011-05-07 Thread Dominic Watson
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,

RE: Replace cfhttp with jquery.post()

2011-05-07 Thread Andrew Scott
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/

Re: Replace cfhttp with jquery.post()

2011-05-06 Thread David Mineer Jr
> 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

RE: Replace cfhttp with jquery.post()

2011-05-06 Thread andy matthews
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

Re: Replace cfhttp with jquery.post()

2011-05-06 Thread David Mineer Jr
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

Re: Replace cfhttp with jquery.post()

2011-05-06 Thread Russ Michaels
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

Re: Replace cfhttp with jquery.post()

2011-05-06 Thread Justin Scott
> 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

Re: Replace cfhttp with jquery.post()

2011-05-06 Thread David Mineer Jr
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

Re: Replace cfhttp with jquery.post()

2011-05-06 Thread David Mineer Jr
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

Re: Replace cfhttp with jquery.post()

2011-05-06 Thread Jason Fisher
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

Re: replace function

2011-04-08 Thread John M Bliss
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 > >

Re: replace width/height values in youtube script

2009-06-02 Thread Mike Little
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

Re: replace width/height values in youtube script

2009-06-02 Thread Mike Little
ok, i have made an attempt at converting a php function. unfortunately it does not quite work. i think i am close ??

Re: replace width/height values in youtube script

2009-06-02 Thread Mike Little
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

Re: Replace()

2009-04-05 Thread Peter Boughton
(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

Re: Replace()

2009-04-04 Thread Alan Rother
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

Re: Replace()

2009-04-04 Thread James Holmes
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

Re: Replace()

2009-04-04 Thread James Holmes
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/

Re: replace() vs replacelist() behavious differences

2009-01-14 Thread sam Detweiler
>> > > >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

Re: replace() vs replacelist() behavious differences

2009-01-14 Thread sam Detweiler
> > > > 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

Re: replace() vs replacelist() behavious differences

2009-01-14 Thread sam Detweiler
> > 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

Re: Replace specific character in a string

2008-11-05 Thread s. isaac dealey
> 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

Re: Replace specific character in a string

2008-11-05 Thread Barney Boisvert
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)#) >

RE: Replace specific character in a string

2008-11-05 Thread Andy Matthews
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

RE: Replace specific character in a string

2008-11-05 Thread Andy Matthews
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

Re: Replace specific character in a string

2008-11-05 Thread s. isaac dealey
> 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

Re: Replace specific character in a string

2008-11-05 Thread Barney Boisvert
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);

RE: Replace comma in replace list

2008-06-26 Thread Bobby Hartsfield
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'

Re: Replace comma in replace list

2008-06-26 Thread Claude Schneegans
>>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. ~~

RE: Replace comma in replace list

2008-06-26 Thread Robert Harrison
#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

Re: Replace comma in replace list

2008-06-26 Thread Claude Schneegans
>>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

Re: Replace comma in replace list

2008-06-26 Thread Pete Jordan
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

Re: Replace comma in replace list

2008-06-25 Thread Sam Roach
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

Re: Replace comma in replace list

2008-06-25 Thread Barney Boisvert
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

RE: Replace comma in replace list

2008-06-25 Thread Bobby Hartsfield
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

Re: Replace comma in replace list

2008-06-25 Thread Barney Boisvert
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

RE: replace words in a string

2008-03-27 Thread Will Swain
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

Re: replace words in a string

2008-03-26 Thread Azadi Saryev
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

RE: Replace Syntax

2007-11-13 Thread Dave Watts
> #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

Re: Replace Syntax

2007-11-13 Thread Eric Cobb
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

RE: Replace Syntax

2007-11-13 Thread Bobby Hartsfield
..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. 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

Re: Replace Syntax

2007-11-13 Thread Claude Schneegans
>>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

RE: Replace Syntax

2007-11-13 Thread Robert Harrison
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

Re: Replace Syntax

2007-11-13 Thread Ben Doom
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

RE: Replace Syntax

2007-11-13 Thread Rick Sanders
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

Re: Replace Syntax

2007-11-13 Thread Todd
#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

RE: Replace Syntax

2007-11-13 Thread Adkins, Randy
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

Re: Replace spaces with dashes

2007-10-18 Thread Aaron Rouse
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

Re: Replace spaces with dashes

2007-10-18 Thread Casey Dougall
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

Re: Replace spaces with dashes

2007-10-18 Thread morgan l
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

RE: Replace spaces with dashes

2007-10-18 Thread Dawson, Michael
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

Re: Replace spaces with dashes

2007-10-18 Thread [EMAIL PROTECTED]
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

Re: Replace spaces with dashes

2007-10-18 Thread Steve Sequenzia
@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

Re: Replace spaces with dashes

2007-10-18 Thread Aaron Rouse
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

Re: Replace spaces with dashes

2007-10-18 Thread Aaron Rouse
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

Re: Replace spaces with dashes

2007-10-18 Thread morgan l
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

Re: Replace spaces with dashes

2007-10-18 Thread Charlie Griefer
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 >

RE: replace carriage returns

2007-08-24 Thread Brad Wood
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

Re: replace carriage returns

2007-08-24 Thread Crow T. Robot
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)#&

RE: replace carriage returns

2007-08-24 Thread Robert Harrison
> 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

RE: replace carriage returns

2007-08-24 Thread Robert Harrison
> 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

RE: replace carriage returns

2007-08-24 Thread Matthew Smith
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

Re: replace carriage returns

2007-08-24 Thread Charlie Griefer
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

RE: replace carriage returns

2007-08-24 Thread Matthew Smith
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

RE: replace carraige returns

2007-08-24 Thread Brad Wood
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:

RE: replace carriage returns

2007-08-24 Thread Robert Harrison
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

Re: replace carraige returns

2007-08-24 Thread Charlie Griefer
#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

Re: Replace HTML tag with another

2007-02-02 Thread Nathan Strutz
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

Re: Replace HTML tag with another

2007-02-02 Thread Casey Dougall
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 ~~~

Re: Replace HTML tag with another

2007-02-02 Thread Nathan Strutz
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

RE: Replace content between tags (REReplaceNoCase)

2006-12-05 Thread Ben Nadel
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

RE: Replace content between tags (REReplaceNoCase)

2006-12-05 Thread Russ
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

RE: replace syntax issue

2006-11-22 Thread Bobby Hartsfield
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

Re: replace syntax issue

2006-11-22 Thread Jochem van Dieten
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"

RE: replace syntax issue

2006-11-22 Thread Ian Skinner
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

RE: Replace function

2006-11-17 Thread Munson, Jacob
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

Re: Replace function

2006-11-17 Thread Pete Freitag
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

Re: replace function

2006-10-02 Thread Josh Nathanson
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

RE: replace function

2006-10-02 Thread Andy Matthews
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

Re: replace function

2006-10-02 Thread Carl L
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

RE: Replace String

2005-09-14 Thread S . Isaac Dealey
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: Replace String

2005-09-14 Thread Matthew Walker
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

Re: Replace String

2005-09-14 Thread S . Isaac Dealey
> 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

RE: Replace String

2005-09-14 Thread Dave.Phillips
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--

RE: Replace or REReplace function question.

2005-08-26 Thread Andy McShane
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

Re: Replace or REReplace function question.

2005-08-25 Thread Claude Schneegans
>>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

Re: Replace or REReplace function question.

2005-08-25 Thread Barney Boisvert
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   2   >