Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site pixdoc.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!talcott!wjh12!pixel!pixdoc!vsh From: vsh@pixdoc.UUCP (Steve Harris) Newsgroups: net.unix Subject: Re: Putting in newlines using sed Message-ID: <24@pixdoc.UUCP> Date: Tue, 19-Nov-85 18:05:05 EST Article-I.D.: pixdoc.24 Posted: Tue Nov 19 18:05:05 1985 Date-Received: Thu, 21-Nov-85 04:29:36 EST References: <376@bcsaic.UUCP> Organization: Pixel Systems, Woburn, MA Lines: 24 Some time ago I tried to do just what you describe. I eventually gave up, but was working on the idea of: save line in hold buffer loop: yank hold buffer delete everything after first "foo ([^)]*)", and print yank hold buffer delete first "foo ([^)]*)" save result in hold buffer test somehow whether or not you're done if not done, goto loop I think it can be done, I just never saw it through. good luck, please post your code if you succeed (it should be pretty ugly!! :-) -- Steve Harris | {allegra|ihnp4|cbosgd|ima|genrad|amd|harvard}\ Pixel Systems Inc. | !wjh12!pixel!pixdoc!vsh 300 Wildwood Street | Woburn, MA 01801 | 617-933-7735 x2314