Not tested, but try this (or a variation): (<!---.*?(?!--->))?<cfquery(.|[\r\n])*?/cfquery>((?<!<!--).*?--->)?
I don't use DW, so I don't know if this supports negative lookahead/lookbehind, and this is sort of off the top of my very tired head. HTH. --Ben The Regex Ninja Doom Ian Skinner wrote: > This is a Dreamweaver find & replace regex question. > > I am using the following code to find all the <cfquery.../cfquery> > blocks to analyze a legacy application. It is working well to find all > the query blocks in the application.. > <cfquery(.|[\r\n])*?/cfquery> > > However, I have noticed that some of the <cfquery> blocks are not active > since they have been commented out. Is it straight forward to > optionally find these queries that are inside a comment set "<!--- ... > --->" and include the entire comment block with the query block as well > as all other query blocks? > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1069 Subscription: http://www.houseoffusion.com/groups/RegEx/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21
