Regular expressions are what you need. Check out REFind in the docs, specifically the subexpression stuff. That'll let you build a generic and flexible mask fir you strings, and the dissect them all with a single process.
cheers, barneyb On 9/6/08, Matthew Smith <[EMAIL PROTECTED]> wrote: > I am parsing a paypal history(csv) to update records in a databse. > > Here is an example of one of the values from one line of the csv: > "#47-Pepper - 10 votes" > > The first number is the primary key from the db. I can parse it, but I am > limited to 4 digits long with my solution, and it is not very elegant. > Here's what I have: > > <cfset primarykey = mid(detail, 3, 1)> > <cfif isnumeric(mid(detail, 4, 1))> > <cfset primarykey = primarykey & mid(detail, 4, 1)> > </cfif> > <cfif isnumeric(mid(detail, 5, 1))> > <cfset primarykey = primarykey & mid(detail, 5, 1)> > </cfif> > <cfif isnumeric(mid(detail, 6, 1))> > <cfset primarykey = primarykey & mid(detail, 6, 1)> > </cfif> > > Is there a better way to do what I am trying to do? > > Thanks. > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312116 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4