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:312112
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to