Re: edit list to be four tabbed fields per record

2010-10-29 Thread LuKreme
On 28-Oct-2010, at 11:55, direwolf wrote: I'm a grep newb but figured there is a way to do this? Maybe a two step process to first replace all returns with tabs and then replace every fourth tab with a return? Find: (^.*$)\r(^.*$)\r(^.*$)\r(^.*$)\r Replace: \1\t\2\t\3\t\4\r -- The only

edit list to be four tabbed fields per record

2010-10-28 Thread direwolf
Hi everyone, I've got a list of codes in a text file. Each code is a separate record (on a separate line). Like this: 1 2 3 4 5 6 7 8 What I want to do is find and replace so that I have four codes per record separated by tabs. Like this: 1 2 3 4 5 6 7 8 I'm a grep newb but figured there is a

Re: edit list to be four tabbed fields per record

2010-10-28 Thread Gabriel Roth
Search for: (.*)\r(.*)\r(.*)\r(.*)\r Replace with: \1\t\2\t\3\t\4\r Make sure 'Use grep' is checked and run 'Replace all.' On Thu, Oct 28, 2010 at 1:55 PM, direwolf direwolf.gh...@gmail.com wrote: Hi everyone, I've got a list of codes in a text file. Each code is a separate record (on a

Re: edit list to be four tabbed fields per record

2010-10-28 Thread direwolf
Wow. Thanks for the super fast reply. That is a great. Now that I see it spelled out, it makes perfect sense. Gotta get myself a good grep tutorial. Thanks again! -- You received this message because you are subscribed to the BBEdit Talk discussion group on Google Groups. To post to this group,

Re: edit list to be four tabbed fields per record

2010-10-28 Thread Gabriel Roth
Gotta get myself a good grep tutorial. If you select 'Tutorial' from BBEdit's Help menu, there's a pretty good introduction to many features. Grep is covered in the section called 'Finders, Keepers.' Once you've worked through that, chapter 8 of the BBEdit user manual is a very readable

Re: edit list to be four tabbed fields per record

2010-10-28 Thread Semper Fidelis
I can recommend Regular Expressions in 10 Minutes by Ben Forta (©2004 by Sams Publishing; ISBN 0-672-32566-7). I also have Mastering Regular Expressions by Jeffrey E. F. Friedl (see http://www.oreilly.com/catalog/regex3/ for details) and, of course, the BBEdit manual, but it's the slim Forta