> Are you really, really, REALLY sure? What if there is a comma inside one of the data fields? "To no surprise, this text contains a comma","...",...
Of course that'll lay waste to it. But does Excel still botch that too? I have old C code somewhere (and possibly still widely used by an international company I used to work for) that probably still handles delimited files 10 times better than Excel - Excel which was otherwise a very good solution - except you lose the challenge of writing a good regex.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'd say: try for yourself. If you import a correctly layed-out .csv with quoted data, it will work as expected.
> I have old C code somewhere
This must be really old code. I take it you haven't done much programming lately.
> (and possibly still widely used by an international company I used to work for)
Yeah, right, sure. You must have been really gooood. Doooogooooooooder???
> except you lose the challenge of writing a good regex.
Lol, do you mean to say this job was challenging and that you put up a good regex? A good regex would be one allowing you to enter the number of repeats, instead of having to repeat the number of times yourself and having to count to make sure that or hope it will work out right.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
> I'd say: try for yourself. If you import a correctly layed-out .csv with quoted data, it will work as expected.
Well good. It's good to know that the various versions people that are still quite popular all handle this. Thanks.
>> I have old C code somewhere
> This must be really old code. I take it you haven't done much programming lately.
Obviously a brain like you wouldn't call what I do programming because bviously you do a lot of **** sucking.
>> (and possibly still widely used by an international company I used to work for)
> Yeah, right, sure. You must have been really gooood. Doooogooooooooder???
I just made it up for no reason. I need to beef up my "nobody" image. Does anything you think make sense? Dogooder??
>> except you lose the challenge of writing a good regex.
> Lol, do you mean to say this job was challenging and that you put up a good regex? A good regex would be one allowing you to enter the number of repeats, instead of having to repeat the number of times yourself and having to count to make sure that or hope it will work out right.
lay off posting here if you can help it - i'm sure i'm not the only one who feels this way
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Personally, I think it is of no much real help to post a regex here a number of times because it has errors in it and being a lot of characters with no visible "logic" and without explaining its working.
The suggestion to use Excel is the best solution provided, in my opinion.
It's simple, it's straightforward.
It does not require any explanation about how the regex should be composed and what options should be set in the find/replace dialog. Hey, I can do a lot of abracadabra, too. That's nice if I want people to like me for being funny, but it doesn't really get done what needs to be done.
> Obviously a brain like you wouldn't call what I do programming because bviously you do
> a lot of **** sucking.
I'm not sure. Are you mistaken by looking at another website, or is that just the mirror?
> (and possibly still widely used by an international company I used to work for)
I think you stress out quite clearly what you want other people to think about you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I wont swear, but something like this should work -
Goto Edit->Find and select the Replace tab and check regular expression
find this:
([^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,).+(,.*)
replace with:
\1\2
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You might also want to replace each , by a newline + some identifier and then record and play a macro that deletes each 7th to 16th line, then replace the newline + identifier again by ,'s.
The most easy way to achieve this is use a spreadsheet program like Excel. Just read the csv file, remove the particular columns and write it back.
You may also replace all ,'s by tabs in Notepad++ and then paste the data into Excel and do the same.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I was hoping someone could help me. I have a comma delim file with 17 commas:
Value,Value,Value.....etc.
What I want to do, is delete all the data after comma 6, and before comma 17, but not sure how to do it. Any help would be greatly appreciated.
Thanks!
> Are you really, really, REALLY sure? What if there is a comma inside one of the data fields? "To no surprise, this text contains a comma","...",...
Of course that'll lay waste to it. But does Excel still botch that too? I have old C code somewhere (and possibly still widely used by an international company I used to work for) that probably still handles delimited files 10 times better than Excel - Excel which was otherwise a very good solution - except you lose the challenge of writing a good regex.
> But does Excel still botch that too?
I'd say: try for yourself. If you import a correctly layed-out .csv with quoted data, it will work as expected.
> I have old C code somewhere
This must be really old code. I take it you haven't done much programming lately.
> (and possibly still widely used by an international company I used to work for)
Yeah, right, sure. You must have been really gooood. Doooogooooooooder???
> except you lose the challenge of writing a good regex.
Lol, do you mean to say this job was challenging and that you put up a good regex? A good regex would be one allowing you to enter the number of repeats, instead of having to repeat the number of times yourself and having to count to make sure that or hope it will work out right.
>> But does Excel still botch that too?
> I'd say: try for yourself. If you import a correctly layed-out .csv with quoted data, it will work as expected.
Well good. It's good to know that the various versions people that are still quite popular all handle this. Thanks.
>> I have old C code somewhere
> This must be really old code. I take it you haven't done much programming lately.
Obviously a brain like you wouldn't call what I do programming because bviously you do a lot of **** sucking.
>> (and possibly still widely used by an international company I used to work for)
> Yeah, right, sure. You must have been really gooood. Doooogooooooooder???
I just made it up for no reason. I need to beef up my "nobody" image. Does anything you think make sense? Dogooder??
>> except you lose the challenge of writing a good regex.
> Lol, do you mean to say this job was challenging and that you put up a good regex? A good regex would be one allowing you to enter the number of repeats, instead of having to repeat the number of times yourself and having to count to make sure that or hope it will work out right.
lay off posting here if you can help it - i'm sure i'm not the only one who feels this way
Personally, I think it is of no much real help to post a regex here a number of times because it has errors in it and being a lot of characters with no visible "logic" and without explaining its working.
The suggestion to use Excel is the best solution provided, in my opinion.
It's simple, it's straightforward.
It does not require any explanation about how the regex should be composed and what options should be set in the find/replace dialog. Hey, I can do a lot of abracadabra, too. That's nice if I want people to like me for being funny, but it doesn't really get done what needs to be done.
> Obviously a brain like you wouldn't call what I do programming because bviously you do
> a lot of **** sucking.
I'm not sure. Are you mistaken by looking at another website, or is that just the mirror?
> (and possibly still widely used by an international company I used to work for)
I think you stress out quite clearly what you want other people to think about you.
> I think you stress out quite clearly what you want other people to think about you.
I'm stressing? Your assumptions about pretty much everything reveal a really dumb guy.
Excel was a great solution. Did anybody argue that? Too bad if my posts weren't all picture perfect. There is a loser here and it ain't me.
Oh, you are wrong so many times. You don't even seem to understand the meaning of the verb stress here.
I wont swear, but something like this should work -
Goto Edit->Find and select the Replace tab and check regular expression
find this:
([^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,).+(,.*)
replace with:
\1\2
Thanks...the export to excel then replace tab w , did the trick!
Thanks again
oops, I meant this (I ended the last one wrongly - I'm not sure if $ at end will work either)
([^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,).+(,[^,]*) $
replace with:
\1\2
Using regex is a way to do it.
You might also want to replace each , by a newline + some identifier and then record and play a macro that deletes each 7th to 16th line, then replace the newline + identifier again by ,'s.
The most easy way to achieve this is use a spreadsheet program like Excel. Just read the csv file, remove the particular columns and write it back.
You may also replace all ,'s by tabs in Notepad++ and then paste the data into Excel and do the same.
Oops, again - I was really really sloppy - I tested this one and it worked
^([^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,)[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*(,[^,]*)
replace with:
\1\2
Are you really, really, REALLY sure? What if there is a comma inside one of the data fields? "To no surprise, this text contains a comma","...",...