This regular expression finds the times (hh:mm) in every column, and puts them into ‘capture buffers’ 1-6 for each column:
^(\d\d:\d\d)\t(\d\d:\d\d)\t(\d\d:\d\d)\t(\d\d:\d\d)\t(\d\d:\d\d)\t(\d\d:\d\d)$ ^ starts at the beginning of a line () represents a capture buffer; the first set is buffer 1, etc. \d\d:\d\d looks for 2 digits followed by a colon followed by 2 more digits \t looks for a tab $ anchors to end of line Now you have everything in 6 capture buffers, you can rearrange/edit to your heart’s content: H\1\tH\2\tL\3\tL\4\tH\5\tH\6 H is for high tide \1 is capture buffer 1 \t is tab I’ve assumed the digit at the start isn’t part of the data. This won’t catch your short line… there are ways around that. HTH > On 2018-03-23, at 14:02, jgill <[email protected]> wrote: > > I have seven columns of tide times separated by tabs and I want to add a > letter to the beginning of each time in a column. H=High L=Low > > I have found how to select a column of text with the alt key but when I put > the search and replace (/d/d:/d/d) - H\1 into the dialog, the 'Replace All' > item is not available. > > How do I do this? > > > > APRIL 2018 > 1 H00:25 H05:20 L10:10 L13:50 H17:40 H22:30 > > v v v v v v > > 2 02:15 06:00 10:55 14:35 18:20 23:15 > 3 02:55 06:45 11:35 15:15 19:00 > 4 00:00 03:35 07:25 12:20 16:00 19:45 > 5 00:40 04:20 08:05 13:05 16:45 20:25 > 6 01:25 05:00 08:50 13:50 17:30 21:10 > 7 02:10 05:45 09:35 14:40 18:10 22:05 > 8 03:00 06:25 10:30 15:40 18:55 23:05 > -- This is the BBEdit Talk public discussion group. If you have a feature request or would like to report a problem, please email "[email protected]" rather than posting to the group. Follow @bbedit on Twitter: <http://www.twitter.com/bbedit> --- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/bbedit.
