List Info

Thread: Tag set inside another tag set.




Tag set inside another tag set.
country flaguser name
United States
2007-10-03 11:55:59
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(.|[rn])*?/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?



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~|
ColdFusion is delivering applications solutions at at top
companies 
around the world in government.  Find out how and where now
http://www.adobe.co
m/cfusion/showcase/index.cfm?event=finder&productID=1522
&loc=en_us

Archive: http://www.houseoffusion.com/groups/RegEx/me
ssage.cfm/messageid:1067
Subscription: http://www.houseoffusion.com/groups/RegEx/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/u
nsubscribe.cfm?user=22184.15789.21

Re: Tag set inside another tag set.
country flaguser name
United States
2007-10-03 12:24:32
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(.|[rn])*?/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?
Another wrinkle.  There can be one or more query blocks
inside the 
comment block.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report
Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5a
dobecf8%5Fbeta

Archive: http://www.houseoffusion.com/groups/RegEx/me
ssage.cfm/messageid:1068
Subscription: http://www.houseoffusion.com/groups/RegEx/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/u
nsubscribe.cfm?user=22184.15789.21

Re: Tag set inside another tag set.
country flaguser name
United States
2007-10-04 10:04:51
Not tested, but try this (or a variation):

(<!---.*?(?!--->))?<cfquery(.|[rn])*?/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(.|[rn])*?/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=RV
JP

Archive: http://www.houseoffusion.com/groups/RegEx/me
ssage.cfm/messageid:1069
Subscription: http://www.houseoffusion.com/groups/RegEx/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/u
nsubscribe.cfm?user=22184.15789.21

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )