From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp5.jps.net ([216.119.0.85]) by hawkwind.utcs.toronto.edu with SMTP id <25114>; Mon, 27 Mar 2000 00:24:09 -0500 Received: from pkwksj.sjna.corp.dom (209-239-201-125.oak.jps.net [209.239.201.125]) by smtp5.jps.net (8.9.3/8.9.0) with SMTP id PAA05678; Sat, 25 Mar 2000 15:47:52 -0800 (PST) From: "kim kubik" To: , "sam Fans" Subject: Re: the obvious. =) Date: Sat, 25 Mar 2000 18:47:54 -0500 Message-ID: <01bf96b4$8a262aa0$7dc9efd1@pkwksj.sjna.corp.dom> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 -----Original Message----- From: James A. Robinson To: sam Fans Date: Friday, March 24, 2000 10:26 PM Subject: the obvious. =) >I just have to shout to the world (well, to sam fans) that this editor >is wonderful>I'm finally ready I can just write > >,x/^\/\*(.+\n)+ \*\/\n/ t /}\n/ > >To copy the top comment down to the second method. e.g. > Jim (or anyone): this just ran up against my (mis)understanding of sam's regexp's. I'm sure when first using sam I did something similar to your example above and the 'greedy' little bastard (.+\n)+ would (to my way of thinking) eat the whole file, that is, never see the closing */ of the commment because the .+ should just keep on going. But I tried what you have and it works, so obviously all this time the way I've been getting around this, using addresses, e.g. ,x/re/{ .,/re2/do stuff } isn't necessary. So what am I missing? - kim PS: in your example there's a space after the second + that shouldn't be there, right? At least by your example, but probably you do comments as: /* * so there really is a space * before the last splat. * */ And the example left this out.