Regular Expression To Pull Values From A Commented Area

2008-01-23 Thread Philip Hayes
I need some help with an area of ColdFusion which I would call my Achilles Heal of ColdFusion Programming. I cannot get my mind around Regular Expressions, but know its the solution to many of my problems. For example I have the following CF Comment on a cfm page: !--- Widget Name: My

Re: Regular Expression To Pull Values From A Commented Area

2008-01-23 Thread Claude Schneegans
Is there anybody out there who can help me do this? Sure, there is CF_REextract. It will return all your fields in a list or a query, and even read the file for you. See: http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm

RE: Regular Expression To Pull Values From A Commented Area

2008-01-23 Thread Bobby Hartsfield
Expression To Pull Values From A Commented Area I need some help with an area of ColdFusion which I would call my Achilles Heal of ColdFusion Programming. I cannot get my mind around Regular Expressions, but know its the solution to many of my problems. For example I have the following CF

RE: Regular Expression To Pull Values From A Commented Area

2008-01-23 Thread Bobby Hartsfield
Although it will still work exactly the same, it actually finds everything between the first instance of !--- and -- I used html comments for testing and forgot to change the -- to --- ..:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com

Re: Regular Expression To Pull Values From A Commented Area

2008-01-23 Thread Philip Hayes
That's pretty cool. i have never seen that tag before. I'll try it. Thanks On Jan 23, 2008, at 11:58 AM, Claude Schneegans wrote: Is there anybody out there who can help me do this? Sure, there is CF_REextract. It will return all your fields in a list or a query, and even read the file for

Re: Regular Expression To Pull Values From A Commented Area

2008-01-23 Thread Sonny Savage
Here's one approach: !--- Comments with fields --- cfset regexComment = !---(.*?)--- cfset regexCommentFields = ^(.*?):(.*)$ cfset fileContent = blah blah!--- Sample Comment ---ya ya !--- Widget Name: My Widget Widget URL: http://siriusinnovations.com Description: This is the description Version: