From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <0d4b348a5b0744e3659e5b5f8877296f@plan9.bell-labs.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] Sam / text search query From: "rob pike, esq." MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Tue, 18 Jun 2002 01:07:39 -0400 Topicbox-Message-UUID: b1b7512c-eaca-11e9-9e20-41e7f4b1d025 this is the easiest way ,x g/sprintf/ .,/.*msgprint.*\n/ p it seems easy to me, almost a transcription of what you're asking to do. if you have multiple sprintfs before msgprint, though, you might prefer this: ,x g/msgprint/ ?.*sprintf.*\n?,.p subtler but maybe more correct; your specification was ambiguous. -rob