From: "James A. Robinson" <Jim.Robinson@Stanford.Edu>
To: "sam Fans" <sam-fans@hawkwind.utcs.toronto.edu>
Subject: formatting HTML tables in ascii
Date: Tue, 31 Aug 1999 11:47:28 -0400 [thread overview]
Message-ID: <199908311547.IAA06460@highwire.stanford.edu> (raw)
I'm trying to format an HTML table using sam's regexp commands. What
I wanted was a single line for each row, with each column seperated by
a tab. I can handle single-line columns in a row like
a a a
b b b b b
c c c c c
d d d d d
e e e e e e e e
f f
without a problem using
, y/\n[A-Za-z0-9]/ x/\n/ d
, x/ +/ c/ /
But how do I craft a regexp to handle a blob of a multicolumn lines?
01F6
1
LATIN CAPITAL LETTER HWAIR
97-May-29
Accepted
98-Oct-22
Stage 6
01F7
1
LATIN CAPITAL LETTER WYNN
97-May-29
Accepted
98-Oct-22
Stage 6
I can match the blobs with
, x/^[A-Za-z0-9]+ *\n( +([A-Za-z0-9\- ]+)+\n)+/
But is there any way to craft a regxp that, in the above example, replaces
'HWAIR\n' with 'HWAIR\t' but replaces '97-May-29\n' with '97-May-29 '
(a column sep vs a line join)?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
James A. Robinson jim.robinson@stanford.edu
Stanford University HighWire Press http://highwire.stanford.edu/
650-723-7294 (W) 650-725-9335 (F)
next reply other threads:[~1999-09-01 5:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-08-31 15:47 James A. Robinson [this message]
1999-09-01 8:07 Nigel Roles
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199908311547.IAA06460@highwire.stanford.edu \
--to=jim.robinson@stanford.edu \
--cc=sam-fans@hawkwind.utcs.toronto.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).