It all depends on how your variables are coded. If you are using dot
notation everywhere it is pretty straightforward.

<[^>]*?(session|server\.mydomain)\.(\w+(?:\.\w+)*).*?>


Use it in a loop with refindnocase and set the 4th argument to true.
This will give you a structure of arrays you can use to extract the
info:
2nd index will give you the entire tag the variable is used in
3rd index gives you the type of variable
4th index gives you the name of the variable

This will not work if you have arrays or use array notation on
variables. This will not work for variables used between tags (just
variables inside tags). I also didn't test this.

Pascal

> -----Original Message-----
> From: Nick Baker [mailto:[EMAIL PROTECTED]
> Sent: 27 January 2005 21:54
> To: RegEx
> Subject: Stripping variables and/or tags from CF templates
> 
> New to this list and seeking help on using regex to extract the names
of
> session and server scope variables from CF templates. The goal is to
> obtain
> a mapping of variables used by template.
> 
> I anticipate using CFFile to process CF Templates
> 
> Needed
> 
> Extract a session.XXX and server.mydomain.XXX variables found within
the
> template.
> 
> I think I can find the "session." and "server.mydomain.", with the
Find
> function, but determining the end of the variable and extracting that
> stumps me.
> 
> Wish list
> 
> Be nice to also extract the entire tag the variable is used in to
provide
> info on just how the variable is used.
> 
> Am curious if one of you regex guru's could give me some ideas?
> 
> Thanks,
> 
> Nick
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:21:827
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/21
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:21
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to