ChuckSoper grep: removing a column in a tab-delimited file
Mar 13, 2009; 14:50
ChuckSoper
grep: removing a column in a tab-delimited file
Hello,
I'm trying to delete the fourth column of a tab-delimited text file. I think that this is relatively straightforward. Excel failed at this task because it changed my date formats automatically. I'm also not confident that it preserves the text encoding.
I just accidentally sent a partially written email to the list. In the meantime, I discovered the answer to my issue. I re-read the help section on Matching Delimited Strings. I believe that I need to use a grep pattern that specifies any character except a tab then repeat it. I'm trying to find the first four columns and replace with the first three columns. Something like this:
Search for: (^(.+?\t){3})((.+?\t){1}) Replace: \1
This works great! I love BBEdit.
Thanks, Chuck
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a specific feature request or would like to report a suspected (or confirmed) problem with the software, please email to "support@barebones.com" rather than posting to the group. -~----------~----~----~----~------~----~------~--~-
Mar 14
Lewis@Gmail Re: grep: removing a column in a tab-delimited file
Mar 14, 2009; 16:30
Lewis@Gmail
Re: grep: removing a column in a tab-delimited file
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!