From: "rob pike" <rob@plan9.bell-labs.com>
To: sam-fans@hawkwind.utcs.toronto.edu
Subject: Re: the obvious. =)
Date: Mon, 27 Mar 2000 09:37:26 -0500 [thread overview]
Message-ID: <00Mar27.152220est.25324@hawkwind.utcs.toronto.edu> (raw)
,x/^\/\*(.+\n)+ \*\/\n/ t /}\n/
Regular expressions have their limitations, which is why Sam
also has addresses. These provide a simpler and safer way to
match multi-line things like comments:
,x/^\/\*/ .,/\*\/\n/ t /}\n/
This one works even if there are no blank lines.
Here's a troff paragraph-at-a-time pattern:
,x/^\.PP/ .,/^\.(PP|SH)/- ...
Also if there's a slash in the pattern, you can use another character
as the delimiter and save a backslash, as in this example for C++ //
comments:
x/\/\// goes to x;//;
Have fun.
-rob
next reply other threads:[~2000-03-27 20:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-27 14:37 rob pike [this message]
[not found] <chaotrope@jps.net>
2000-03-26 20:54 ` kim kubik
2000-03-27 3:35 ` James A. Robinson
-- strict thread matches above, loose matches on Subject: below --
2000-03-25 23:47 kim kubik
2000-03-26 1:51 ` 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=00Mar27.152220est.25324@hawkwind.utcs.toronto.edu \
--to=rob@plan9.bell-labs.com \
--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).