this is the fix, last night, that worked/works 100%

the report_id="54654654"
is part of an xml feed, so I needed to strip everything from that xml
feed
except that number, which could be any number of digits :)

thanks anyway!  (I believe Dick Applebaum made the final
correct analysis....)

<cfset Report_ID =
ReReplaceNocase(sourceString,'.*report_id="([^\"]*)".*', '\1')>

..tony

Tony Weeg
Senior Web Developer
Information System Design
Navtrak, Inc.
Fleet Management Solutions
www.navtrak.net
410.548.2337 

-----Original Message-----
From: Raymond Camden [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, August 22, 2002 8:46 AM
To: CF-Talk
Subject: RE: regex question


Heh - ok. If you know for a fact ther format is ALWAYS:

VARNAME="NUMBER"

You can do:

<cfset s = "report_id=""54355""">

<cfset varName = listFirst(report_id,"=")>
<cfset value = listLast(report_id,"=")>
<!--- remove "" --->
<cfset value = replace(value,"""","","all")>

<!--- set var --->
<cfset setVariable(varName,value)>



=======================================================================
Raymond Camden, ColdFusion Jedi Master for Hire

Email    : [EMAIL PROTECTED]
Yahoo IM : cfjedimaster

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, August 22, 2002 8:38 AM
> To: CF-Talk
> Subject: RE: regex question
> 
> 
> sick'em RAY!
> 
> On Thu, 22 Aug 2002, Everett, Al wrote:
> 
> > Assuming that string is in a variable 'x', this will do it:
> > 
> > <cfset #evaluate(x)#>
> > 
> > > -----Original Message-----
> > > From: Tony Weeg [mailto:[EMAIL PROTECTED]]
> > >
> > > report_id="545687" 
> > > 
> > > if i wanted to find that string above (report_id="545687"),
> > > and extract the digits from inside the
> > > string, and make them a cf variable called
> > > reportId....whats the best way?
> 
> -- 
> ============================================================
> Todd Rafferty ([EMAIL PROTECTED]) - http://www.web-rat.com/ |
>         Team Macromedia Volunteer for ColdFusion           |
> http://www.macromedia.com/support/forums/team_macromedia/  |
> http://www.flashCFM.com/   - webRat (Moderator)            |
> http://www.ultrashock.com/ - webRat (Back-end Moderator)   |
> ============================================================
> 
> 

______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
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

Reply via email to