REMatch() is new to CF8, as is the array attribute in cfloop. Change the cfloop to an indexed loop and use http://www.cftagstore.com/tags/cfreextract.cfm or similar for the RegEx extraction.
Adrian http://www.adrianlynch.co.uk/ -----Original Message----- From: Web Exp Sent: 31 December 2007 05:35 To: CF-Talk Subject: cf8 code in cf7 Hi... I need help making this CF8 code work in CF7. Can anyone help me with this? Here's the code: <cfset re1='.*?'> <cfset re2='((?:[a-z][a-z\.\d]+)\.(?:[a-z\d]+))(?![\w\.])'> <cfset re = #re1#&#re2#> <!--- read the html file ---> <cffile action="read" file="#expandPath('homepage.html')#" variable="htmldoc"> <!--- return an array of image tags ---> <cfset images = REMatchNoCase("<img([^>]*[^/])>", htmldoc)> <cfset files = arrayNew(1)> <cfloop array="#images#" index="i"> <cfset imgpath = REMatchNoCase(re, i)> <cfset imgpath = replace(imgpath[1],"""","","all")> <cfset tmp = structNew()> <cfset tmp.path = imgpath> <cfset tmp.filename = listLast(imgpath,"/")> <cfset tmp.fileExtension = right(imgpath,3)> <cfset tmp.filetype = "image"> <cfset arrayAppend(files,tmp)> </cfloop> <cfdump var="#files#"> Thanks, K ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295570 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

