From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailgate.cadence.com ([158.140.2.1]) by hawkwind.utcs.utoronto.ca with SMTP id <24769>; Thu, 2 Sep 1999 04:26:38 -0400 Received: (from smap@localhost) by mailgate.cadence.com (8.8.5/8.6.8) id BAA28322; Wed, 1 Sep 1999 01:09:09 -0700 (PDT) Received: from symnt3.Cadence.COM(194.32.101.100) by mailgate.cadence.com via smap (mjr-v1.2) id xma936173348.028309; Wed, 1 Sep 99 01:09:08 -0700 Received: by symnt3.cadence.com with Internet Mail Service (5.5.2232.9) id ; Wed, 1 Sep 1999 09:07:55 +0100 Message-ID: <1E485299309FD211A2100090271E27A4143246@symnt3.cadence.com> From: Nigel Roles To: "'Jim.Robinson@Stanford.Edu'" , sam Fans Subject: RE: formatting HTML tables in ascii Date: Wed, 1 Sep 1999 04:07:54 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2232.9) Content-Type: text/plain; charset="iso-8859-1" My HTML might be a bit weak, but this will swap all the \n's in the blob to \t's. ,x/^[A-Za-z0-9]+ *(\n +([A-Za-z0-9\- ]+)+)+/x/\n/c/ / -----Original Message----- From: James A. Robinson [mailto:Jim.Robinson@Stanford.Edu] Sent: Tuesday, August 31, 1999 4:47 PM To: sam Fans Subject: formatting HTML tables in ascii 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)