assuming your source is actual/valid XML, why not just use XMLParse()? On Thu, Jan 1, 2009 at 11:29 AM, Paul Kukiel <[email protected]> wrote:
> Perfect Thank you very much. > > > On 01/01/2009, at 2:22 PM, Matt Quackenbush wrote: > > > <cfscript> > > string = '<?xml version="1.0" encoding="utf-8"?><double xmlns=" > > http://www.webserviceX.NET/">0.7025</double>'; > > dbl = reReplace(string, '(.*?double[^"]+">)([^<]+)(<.*)', '\2'); > > </cfscript> > > > > <cfoutput> > > string: #htmlEditFormat(string)#<br /> > > dbl: #dbl#<br /> > > </cfoutput> > > > > > > On Thu, Jan 1, 2009 at 1:04 PM, Paul Kukiel wrote: > > > >> I'm stuck with this and I'm sure its easy but I need to extract > >> 0.7025 from this result string. > >> > >> i've got it as close as: >0.07025< with 2 re's I'm sure it can be > >> done in one any help is appreciated. > >> > >> <cfset string = "<?xml version=""1.0"" encoding=""utf-8""?> <double > >> xmlns=""http://www.webserviceX.NET/"">0.7025</double>" /> > >> <cfset result = reMatch('<double\b[^>]*>(.*?)</double>',string)/> > >> <cfdump var="#result#" /> > >> <cfset result2 = reMatch('>\b(.*?)<',result[1]) /> > >> <cfdump var="#result2#" /> > >> > >> Paul. > >> > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317314 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

