Re: CFHTTP and replace() on Multiple Lines

2004-08-31 Thread joe velez
it appears that there are more than 1 carriage returns in your document, and you're only trying to replace 1.. actually only:




when maybe you should be replacing #chr(13)##chr(13)##chr(13)# for 





how bout instead of chr(13) just use a physical cr ...

line = replace(document, '
', '', 'ALL')#

you could also run the above through the whole document. this would essentially out all the html on 1 line, then go through and replace close tags with a close tag and a line feed.

i think you could also use mid or a regex to get the data between  and  and trim it.

just some ideas.

 joe
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: CFHTTP and replace() on Multiple Lines

2004-08-31 Thread Barney Boisvert
Where a single search doesn't work, I usually revert to finding the
start index 'start = find("
index 'end = find("", myStr, start) + 4' and then do a mid(myStr,
start, end) call to pull it out.  You may have to tweak that a little,
but that's the idea.

cheers,
barneyb

On Tue, 31 Aug 2004 12:27:46 -0400, Josen Ruiseco
<[EMAIL PROTECTED]> wrote:
> I am calling a document via cfhttp. I am replacing numerous lines of text within the called document.
> 
> There is a snippet in the document that I cannot seem to grab:
> 
> 
> 
> 
> 
> Spacing is as it is in the doc...
> 
> I can grab the  with no problem. But I cannot grab the  because I will screw up the entire document. I tried control characters to get the whole thing - chr(), etc. (replace(document,"#chr(13)#...", "")>) but it seems that I could not grab them that way.
> 
> Any ideas?
> 
> Regards,
> 
> Josen
> GoMotorBids.com
> 
-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: CFHTTP and replace() on Multiple Lines

2004-08-31 Thread Pascal Peters
Use regexp?

REReplaceNoCase(str,"\s+","","all")

Pascal

> -Original Message-
> From: Josen Ruiseco [mailto:[EMAIL PROTECTED]
> Sent: 31 August 2004 18:28
> To: CF-Talk
> Subject: CFHTTP and replace() on Multiple Lines
> 
> I am calling a document via cfhttp. I am replacing numerous lines of
text
> within the called document.
> 
> There is a snippet in the document that I cannot seem to grab:
> 
> 
> 
> 
> 
> 
> 
> Spacing is as it is in the doc...
> 
> I can grab the  with no problem. But I cannot grab the

> because I will screw up the entire document. I tried control
characters to
> get the whole thing - chr(), etc. (replace(document,"
> width=1>#chr(13)#...", "")>) but it seems that I could not grab
them
> that way.
> 
> Any ideas?
> 
> Regards,
> 
> Josen
> GoMotorBids.com
> 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: CFHTTP and replace() on Multiple Lines

2004-08-31 Thread Josen Ruiseco
>Where a single search doesn't work, I usually revert to finding the
>start index 'start = find("
>index 'end = find("", myStr, start) + 4' and then do a mid(myStr,
>start, end) call to pull it out.  You may have to tweak that a little,
>but that's the idea.
>
>cheers,
>barneyb
>
>On Tue, 31 Aug 2004 12:27:46 -0400, Josen Ruiseco
><[EMAIL PROTECTED]> wrote:
>-- 
>Barney Boisvert
>[EMAIL PROTECTED]
>360.319.6145
>http://www.barneyb.com

It turns out that I used the find function then used the removeChars function. Other techniques, such as ReFindNoCase and replace using chr()s did not work.

Thanks to all for the help...

Josen
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]