>- see footer for list info -<
Not a direct answer...

2 pages, temp1.cfm and temp2.cfm

temp1.cfm
---------------------
<html>
<head>
        <title>Untitled</title>
</head>

<body>

<cfdump var="#FORM#">

<!--- <cfdump var="Don't pick me"> --->

<cfdump var="#URL#">

</body>
</html>


temp2.cfm
---------------------
<cffile action="READ" file="#ExpandPath('.')#\temp1.cfm" variable="f">

<cfoutput>
<pre>#HTMLEditFormat(f)#</pre>
</cfoutput>

<!--- Find all cfdumps --->
<cfset regEx ="<cfdump.*?>">
<cfset pos = 1>
<cfset struct = REFindNoCase(regEx, f, pos, true)>

<cfloop condition="#struct.pos[1]#">
        <cfdump var="#struct#">
        <cfset pos = struct.pos[1] + 1>
        <cfset struct = REFindNoCase(regEx, f, pos, true)>
</cfloop>

<hr />

<!--- Find commented out cfdumps --->
<cfset regEx ="<!---\s*?<cfdump.*?>\s*?--->">
<cfset pos = 1>
<cfset struct = REFindNoCase(regEx, f, pos, true)>

<cfloop condition="#struct.pos[1]#">
        <cfdump var="#struct#">
        <cfset pos = struct.pos[1] + 1>
        <cfset struct = REFindNoCase(regEx, f, pos, true)>
</cfloop>

This will find all cfdumps and all commented out cfdumps. You could then
filter out the commented out cfdumps.

Any good?

Adrian


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Andrew Davidson
Sent: 12 April 2006 11:02
To: [email protected]
Subject: [CF-Dev] RegExp


>- see footer for list info -<
OK, I admit I am %*£% at RegExp. I am trying to search code for all
occurrences of <cfdump, but NOT when it surrounded by comment tags, so want
it to return ...

  <cfdump var="#foo#">

  ... but NOT ...

  <!--- <cfdump var="#foo#"> --->

  ... nothing I have tried works! does anyone have a good regexp builder
that they use?


---------------------------------
Yahoo! Messenger  NEW - crystal clear PC to PC calling worldwide with
voicemail
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to