great, thank you mike ;) thank you matt. dick's one liner, works great!!!!
<cfset Report_ID = ReReplaceNocase(sourceString,'.*report_id="([^\"]*)".*', '\1')> very slick!! tw -----Original Message----- From: Michael Dinowitz [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 21, 2002 10:42 PM To: CF-Talk Subject: Re: regex question Your missing a quote <cfset ReportId =#REFind("report_id=""([0-9]+)"", myString, 1, true)#> This is your original string. the first quote says your starting the string. The 2 quotes after the = is seen by CF as a literal quote within a string. The second group of 2 quotes are also seen as a literal quote within a string. What's missing? The quote that closes the string. <cfset ReportId =#REFind("report_id=""([0-9]+)""", myString, 1, true)#> I use single quotes within functions in order to avoid such issues: <cfset ReportId =#REFind('report_id="([0-9]+)"', myString, 1, 1)#> > hi matt, thanks very much for your help! > > but this is the error i get when i run > your code? > > Error Diagnostic Information > Just in time compilation error > > unknown context error reached at the end of the CFML templateInvalid > expression format. The usual cause is an error in the expression > structure. > > The last successfully parsed CFML construct was a CFSET tag occupying > document position (14:1) to (14:6). > > The specific sequence of files included or processed is: > D:\www\clients\cx_WebServiceApp\xml_123\test_regex_mid.cfm > > > Date/Time: 08/21/02 22:31:14 > Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) > Remote Address: 127.0.0.1 > > > > -----Original Message----- > From: Matthew Walker [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 21, 2002 10:15 PM > To: CF-Talk > Subject: RE: regex question > > > > cant seem to get this to jive....whats my issue? > > > > > > <cfset ReportId =#REFind("report_id=""([0-9]+)"", myString, 1, true)#> > > <cfset theNumber = Mid(myString, result.pos[2],result.len[2])> > > I realise you've got another solution but for your reference here's the > idea. The first line creates a structure of arrays which you would put > in a holding variable like result (not reportid). Then the second line > grabs the number (the reportid) from the original code based on the > instructions in result: > > <cfset result = REFind("report_id=""([0-9]+)"", xml_123, 1, true)> > <cfset ReportId = Mid(xml_123, result.pos[2],result.len[2])> > > > ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists