this what your looking for?
<cffile action="READ" file="#expandPath('fle.cfm')#" variable="cf" />
<cfset reg = "<(cf[^ >]*)" />
<cfset regTag = "(<cf[^>]*>)" />
<cfif reFindNoCase(reg, cf)>
<cfset start = reFindNoCase(reg, cf) />
<cfloop condition="#reFindNoCase(reg, cf, start)#">
<cfset tag = reFindNoCase(reg, cf, start, true) />
<cfset tagFull = reFindNoCase(regTag, cf, start, true) />
<cfset lines = MID(cf, 1, tag.pos[2]) />
<cfoutput>
<code>LINE #listLen(lines, CHR(10))# : #MID(cf, tag.pos[2], tag.len[2])#
<em>#HTMLEditFormat(MID(cf, tagFull.pos[1], tagFull.len[1]))#</em></code><br
/>
</cfoutput>
<cfset start = tag.pos[1] + tag.len[1] />
</cfloop>
</cfif>
_____
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Dale Fraser
Sent: Monday, 3 September 2007 3:48 PM
To: [email protected]
Subject: [cfaussie] RegEx Help
I struggle with RegEx's
Anyone know if this is even possible.
I want to pull out a unique list of coldfusion tags in a given source string
I assume I can match
<cf*[space]
Can the regex do the unique bit, or do I need to loop through and build a
structure.
Regards
Dale Fraser
<http://dalefraser.blogspot.com> http://dalefraser.blogspot.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---