Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

May 20 2010

19:24

Help parsing a comment file into CSV

On NICAR-L, someone asked the following question. I am posting it here because I wanted the answer to be archived on the web.

folks, i've got a large text file with entries along these lines, tho sometimes the center text has more than one return:

schfish on blah blah blah (return)
text text text text text (return)
10:31 a.m. on May 20, 2010 (return)

i want to separate these things so the first line is in one field, the second in another and the third in a third field... right now i'm using TextWrangler on a Mac, but could use other stuff too, except Microsoft...

thanks for any help!

In followup, it was clarified that the number of lines between the attribution and the dateline is variable.

Don't be the product, buy the product!

Schweinderl