I am trying to reformat tide tables from NOAA. The data comes in this
format:

1       4:09 AM 17.6    H
1       10:30 AM        2.3     L
1       4:34 PM 16.8    H
1       10:52 PM        2.3     L
2       5:02 AM 17.3    H
2       11:24 AM        2.5     L
2       5:30 PM 16.3    H
2       11:45 PM        2.7     L
3       5:56 AM 17.3    H
3       12:20 PM        2.5     L
3       6:26 PM 16.2    H

Each field is separated by a tab, each line has a return. I want to
group all the lines that begin with a common number (1, 2, 3, etc.)
into a single line, like this:

1       4:09 AM 17.6    H  1    10:30 AM        2.3     L  1    4:34 PM 16.8    
H  1    10:52 PM        2.3     L
2       5:02 AM 17.3    H  2    11:24 AM        2.5     L  2    5:30 PM 16.3    
H  2    11:45 PM        2.7     L
3       5:56 AM 17.3    H  3    12:20 PM        2.5     L  3    6:26 PM 16.2    
H

I'm thinking there might we a way to do it via GREP?

FYI -- counting lines won't work, because the number of lines for each
common number varies between 3 and 4 (depending upon how many tide
cycles there are in the day.

Any help would be appreciated.

Thanks,

John

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to