Steve,

Why not try something easier:

<cfscript>
  output = Trim(CFHTTP.FileContent);
  output = REReplaceNoCase(output, "<img[^>/]+[/]?>", "", "all");
</cfscript>

Best,
Seva Petrov
Senior Developer
TheSquare.com


> -----Original Message-----
> From: Steve Reich [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 14, 2001 12:44 PM
> To: CF-Talk
> Subject: Parsing Headache (Removing Multiple Images)
> 
> 
> OK.. I am writing a tag with CFHTTP to blah, blah, blah... it 
> works fine.
> Now I want to port my application to the Palm Pilot so I want 
> to remove the
> images from the output. Here's my line of thinking at the moment...
> 
> <cfscript>
>  output = #Trim(CFHTTP.FileContent)#;
>  imageStart =#Find("<img", output, 1)#;
>  imageEnd = #Find(">", output, imageStart)#;
>  imageLen = imageEnd - imageStart + 1;
>  output = #Replace(output, Mid(output, imageStart, imageLen), 
> "", "ONE")#;
> </cfscript>
> 
> This works great in removing the first image.
> 
> My Question:
> 
> How can I loop this some how to remove all images without 
> knowing how many
> are on the page? Fortunatly there are only 1-3 per page. I've 
> been racking
> my brain for hours over this one.. any takers?
> 
> Thanks,
> Steve
> 
> 
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to