How about something like this (untested): <cfset crlf = chr(13) & chr(10) /> <cfset lineArray = reMatch(crlf, myFile) />
<cfif len(trim(lineArray[26]))> <cfset invoiceNumber = trim(lineArray[26]) /> <cfelse> <cfset invoiceNumber = trim(lineArray[27]) /> </cfif> The variable 'invoiceNumber' should now hold whichever line has content ... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327360 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4