Re: Regex help for huge csv file

2009-07-17 Thread bsisco
> GPG key 1024D/4434BAB3 2008-08-24 > gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 just so everyone knows this has been solved (see below)...but for some reason when i marked it as solved it got posted as a new topic (Re: Regex help for huge csv file[SOLVED]). Not sure why that is

Re: Regex help for huge csv file

2009-07-16 Thread bill lam
On Tue, 14 Jul 2009, Blake M. Sisco wrote: > John, > Sorry about that. Here's a set of examples > > Before: > *,WIRE HARNESS, > ,20403,16 > ,FIBERGLASS, > ,100 FOOT, > ,20400,7 > ,FIBERGLASS, > ,250 FOOT SPOOL, > ,WX12-0,35 > ,WX14-1BR/YLW,160 > > After: > *WIRE HARNESS,, > ,20403,16 > ,20400,7

Re: Regex help for huge csv file

2009-07-16 Thread Richard.Williams.20
You may want to consider using a script using biterscripting ( http://www.biterscripting.com ) . One of the things its editor commands can do is to match regular expressions across lines, words, characters, strings. Make sure you start with the clearest of requirements - that way you can formulat

Re: Regex help for huge csv file[SOLVED]

2009-07-16 Thread Blake M. Sisco
>Well, if they all start with an asterisk in the first column, you > may be able to use my first one to get rid of the unwanted data, > and then take a second pass to recolumnize the remaining ones: I wound up doing just that. I went through and added an asterisk to the ones that needed to keep,

Re: Regex help for huge csv file

2009-07-15 Thread Blake M. Sisco
> > PS: when sending messages to the list, inline replies are greatly > > preferred for clarity over top-posting's Jeopardy-style read. > > While you're at it...if you are able to trim off your company > disclaimer at the end, it does get a little annoying. Seeing as how > this is a publicly viewa

Re: Regex help for huge csv file

2009-07-15 Thread Ben Fritz
On Jul 15, 9:21 am, Tim Chase wrote: > PS: when sending messages to the list, inline replies are greatly > preferred for clarity over top-posting's Jeopardy-style read. While you're at it...if you are able to trim off your company disclaimer at the end, it does get a little annoying. Seeing as

Re: Regex help for huge csv file

2009-07-15 Thread Tim Chase
>>> Before: >>> *,WIRE HARNESS, [snip] >>> After: >>> *WIRE HARNESS,, [snip] >> While I'm not sure what transformation you *want* from this >> data, the following turns your *before* into your *after* >> form: >> >> :g/^,.*[^,],$/d >> >> with the exception of the weirdness where the first "*WIRE

Re: Regex help for huge csv file

2009-07-15 Thread Blake M. Sisco
Tim, It didn't "grow an extra comma" it just moved the one from infront to behind the word. That is where the problem lies. The Part Numbers (ones that consist of numbers and those that consist of words, i.e. "WIRE HARNESS") need to be the first column. There are only a few PNs that consist of w

Re: Regex help for huge csv file

2009-07-15 Thread Tim Chase
> Before: > *,WIRE HARNESS, > ,20403,16 > ,FIBERGLASS, > ,100 FOOT, > ,20400,7 > ,FIBERGLASS, > ,250 FOOT SPOOL, > ,WX12-0,35 > ,WX14-1BR/YLW,160 > ,YELLOW STRIPE, > ,87K 7267,16 > ,SINGLE TWISTED PAIR SHIELDED, > ,WITH DRAIN, > ,32206,5 > ,RING NON INS., > ,DT06-3S,4 > ,W3S,2 > ,ORANGE, > ,W3S-P0

Re: Regex help for huge csv file

2009-07-14 Thread Blake M. Sisco
John, Sorry about that. Here's a set of examples Before: *,WIRE HARNESS, ,20403,16 ,FIBERGLASS, ,100 FOOT, ,20400,7 ,FIBERGLASS, ,250 FOOT SPOOL, ,WX12-0,35 ,WX14-1BR/YLW,160 ,YELLOW STRIPE, ,87K 7267,16 ,SINGLE TWISTED PAIR SHIELDED, ,WITH DRAIN, ,32206,5 ,RING NON INS., ,DT06-3S,4 ,W3S,2 ,ORANG

RE: Regex help for huge csv file

2009-07-13 Thread John Beckett
bsisco wrote: > 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 It's too hard to decode your example. A simpler 'before and a