It's not a trick question, more of an open-ended joke really. EDI is an old method of passing business documents between companies. Here's an example format of an EDI document:
The bitch with these are not all lines and segments are required. Some lines are optional and may not always appear in the document. Othertimes, only specific segments within a line are required. And some companies use different portions of the full EDI spec.
I wrote a parser via PHP to read the segments I needed, but it wasn't very extendable towards other companies. In the end I've given up and decided to use an open source EDI parser called BOTS written in Python hah
Code:
ISA*00* *00* *ZZ*PARTNER *16*102096559PROD *060521*0300*U*00400*638504569*0*P*> GS*PO*PARTNER*102096559PROD*20090421*0300*4569*X*004010 ST*850*891325 BEG*00*NE*MH80312**20090421 CUR*SE*USD REF*CT*123456 DTM*010*20090421 N1*BY*SOLD TO Org Name*ZZ*038181483 N1*PO*PAYOR Org Name*ZZ*038181483 N1*BT*BILL TO Org Name*ZZ*04332571 N1*ST*SHIP TO Org Name*ZZ*0381814830030 N2*Partner Name N3*100 Bramshott Rd. N4*San Jose*CA*95110 PER*IC*John Doe*TE*8015551234*FX*8015554321*EM*[email protected] PO1*1*11*EA*1499.95*CA*BP*12345678*MG*12070205 DTM*010*20090421 CTT*1 AMT*TT*12 SE*18*891325 GE*1*4569 IEA*1*638504569
I wrote a parser via PHP to read the segments I needed, but it wasn't very extendable towards other companies. In the end I've given up and decided to use an open source EDI parser called BOTS written in Python hah

Comment