From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from highwire.stanford.edu ([171.64.249.40]) by hawkwind.utcs.utoronto.ca with SMTP id <24916>; Wed, 1 Sep 1999 01:27:49 -0400 Received: from aubrey.stanford.edu (aubrey.Stanford.EDU [36.48.0.102]) by highwire.stanford.edu (8.8.5/8.7.1) with ESMTP id IAA06460 for ; Tue, 31 Aug 1999 08:47:28 -0700 (PDT) Message-Id: <199908311547.IAA06460@highwire.stanford.edu> X-url: http://highwire.stanford.edu/~jimr/ X-face: "!ZH^<"U,NeU:732A To: "sam Fans" Subject: formatting HTML tables in ascii MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <26591.936114448.1@aubrey.stanford.edu> Date: Tue, 31 Aug 1999 11:47:28 -0400 Sender: jimr@aubrey.stanford.edu 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)