sam-fans - fans of the sam editor
 help / color / mirror / Atom feed
From: "kim kubik" <chaotrope@jps.net>
To: <jim.robinson@stanford.edu>,
	"sam Fans" <sam-fans@hawkwind.utcs.toronto.edu>
Subject: Re: the obvious. =)
Date: Sat, 25 Mar 2000 18:47:54 -0500	[thread overview]
Message-ID: <01bf96b4$8a262aa0$7dc9efd1@pkwksj.sjna.corp.dom> (raw)


-----Original Message-----
From: James A. Robinson <jim.robinson@stanford.edu>
To: sam Fans <sam-fans@hawkwind.utcs.toronto.edu>
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.





             reply	other threads:[~2000-03-27  5:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-25 23:47 kim kubik [this message]
2000-03-26  1:51 ` James A. Robinson
  -- strict thread matches above, loose matches on Subject: below --
2000-03-27 14:37 rob pike
     [not found] <chaotrope@jps.net>
2000-03-26 20:54 ` kim kubik
2000-03-27  3:35   ` James A. Robinson
2000-03-24 21:25 James A. Robinson

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='01bf96b4$8a262aa0$7dc9efd1@pkwksj.sjna.corp.dom' \
    --to=chaotrope@jps.net \
    --cc=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).