Hi all, Here's my problem. I have a csv file that has just over 21k lines. It's basically a bom list for some of our products. It contains: -Product P/N |--Component P/N, Component QTY |--Misc. info that is not needed
What I need to do is remove all the extraneous data so that only the Product P/N and Component P/N are contained within the file. The problem I have is that some of the Product P/Ns contain "Words" (see below). I need your help with figuring out how to remove the cruft while keeping the Product P/Ns intact. Example: Here is a sample of the file ,WIRE HARNESS, //This is the Part number for this particular product. , 20403,16 // Component P/N,Component QTY. ,FIBERGLASS, // This is cruft ,100 FOOT, // Component P/N,Component QTY. , 20400,7 // Component P/N,Component QTY. ,FIBERGLASS, // This is cruft ,250 FOOT SPOOL, // This is cruft ,WX12-0,35 // Component P/N,Component QTY. ,WX14-1BR/YLW,160 // Component P/N,Component QTY. ,YELLOW STRIPE, // This is cruft ,87K 7267,16 // Component P/N,Component QTY. ,SINGLE TWISTED PAIR SHIELDED, //This is cruft ,WITH DRAIN, // This is cruft , 32206,5 // Component P/N,Component QTY. ,RING NON INS., // This is cruft ,DT06-3S, 4 // Component P/N,Component QTY. ....you get the idea. What I've used in the past is ":%s/^,\w*/$//gc" to remove all of the unnecessary "Cruft", but, with this file that obviously wont work. I'm stumped. Any input will be greatly appreciated. --Cheers --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
