[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Find first line FOLLOWING a sequence of matches
From: |
Rusi |
Subject: |
Re: Find first line FOLLOWING a sequence of matches |
Date: |
Tue, 28 Apr 2015 22:37:06 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Wednesday, April 29, 2015 at 8:31:18 AM UTC+5:30, Rusi wrote:
> On Tuesday, April 28, 2015 at 10:24:28 PM UTC+5:30, Subhan Michael Tindall
> wrote:
> > Table like this: (abbreviated)
> > |a|b|c|
> > |a|d|e|
> > |a|z||
> > |m|b|c|
> > |m|c|d|
> > |ab|c|d|
> > First col is relevant (actual table is MUCH bigger)
> >
> > I'm looking to write a macro to convert this table (on an occasionally
> > recurring basis)
> > To something like:
> > ,* a
> > |a|b|c|
> > |a|d|e|
> > |a|z||
> > ,* m
> > |m|b|c|
> > |m|c|d|
> > ,* ab
> > |ab|c|d|
> >
> > The entries in first column are always strings of characters, no internal
> > whitespace
> > Looking for a way to search for the LAST match for a given element
> > With that I should be able to macro-ize my keystrokes and save some time,
> > or better yet come up with something to fully process the file
> >
> > EG:
> > Insert ,* a header
> > Search for a in column 1
> > Find the last a in the block
> > Move down a line
> > Copy m & insert ,* m header
> > Search for m in column 1
> > <repeat>
> >
> > Thousands of lines, hundreds of blocks, don't make me export this to excel
> > and do it there!
> >
> >
>
> org or more specifically orgtbl should be able to do this.
> Maybe ask on the org mailing list?
Some part of the puzzle I had worked out here
https://mail.python.org/pipermail/python-list/2013-September/666040.html
Some more details will need to be worked out
- Re: Find first line FOLLOWING a sequence of matches, (continued)
Re: Find first line FOLLOWING a sequence of matches, Bob Proulx, 2015/04/30
Re: Find first line FOLLOWING a sequence of matches, Rusi, 2015/04/28
- Re: Find first line FOLLOWING a sequence of matches,
Rusi <=