Change the regex to this and see if it works better:
(<img).*?(src="").*?#URL.img#"".*?> 

> -----Original Message-----
> From: Pete Ruckelshaus [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, March 30, 2006 8:59 AM
> 
> Isaac, that didn't work for me.  What I'm doing is if a user deletes
> an image from the image library, then I want to delete any reference
> to that image from the content table in the database.  I'm passing in
> a URL variable for the image name (URL.img).  Here is my query:
> 
> <cfquery name="fixContent" datasource="#request.app.dsname#">
>       UPDATE          tblContent
>       SET                     content = <cfqueryparam 
> cfsqltype="CF_SQL_VARCHAR"
> value="#REReplaceNoCase(checkcontent.content,"<img[[:space:]][
> ^>]*src=""[^""]*#URL.img#[[:
> space:]]*""[^>]*>","","ALL")#">
>       WHERE           ID = <cfqueryparam 
> cfsqltype="CF_SQL_INTEGER" value="#checkcontent.id#">
> </cfquery>
> 
> Yet, when I pass in "tanlines.jpg" as URL.img, it doesn't delete the
> image from this content:
> 
> <img height="144" width="216" align="right" alt=""
> src="/site/images/siteimages/Image/tanlines.jpg" />Welcome to the web
> site.
> 
> I figured out that I needed to "double up" the doublequotes so that
> code doesn't throw an error (note that I am using it inside of a
> CFQUERYPARAM), is my problem how I'm referencing the URL.img value?


[INFO] -- Access Manager:
This transmission may contain information that is privileged, confidential 
and/or exempt from disclosure under applicable law.  If you are not the 
intended recipient, you are hereby notified that any disclosure, copying, 
distribution, or use of the information contained herein (including any 
reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in 
error, please immediately contact the sender and destroy the material in its 
entirety, whether in electronic or hard copy format.  Thank you.   A2



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236559
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to