From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: no-toppost@motz.invalid Newsgroups: gmane.emacs.help Subject: Re: extract lines with regexp Date: Wed, 6 May 2009 11:37:56 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1241617561 21469 80.91.229.12 (6 May 2009 13:46:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 May 2009 13:46:01 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 06 15:45:54 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M1hRW-0000mJ-Fu for geh-help-gnu-emacs@m.gmane.org; Wed, 06 May 2009 15:45:51 +0200 Original-Received: from localhost ([127.0.0.1]:36435 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1hRV-0000d0-Qz for geh-help-gnu-emacs@m.gmane.org; Wed, 06 May 2009 09:45:49 -0400 Original-Newsgroups: gnu.emacs.help,comp.emacs Original-Lines: 43 Original-X-Trace: news.eternal-september.org U2FsdGVkX1+ePXidc0AUt6mGc+rS4juwAqae6gT/TXBYq/0iJpbt+G4a4h6Vd8/qWzO4iuq0bG/ZK9x+5lLLbdTbcCPvPSK05zv6J8o0gh10424IYCLTNGrbK6khPuW8f7u5CxNF5gl+dUSxOqD64g== Original-X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers Original-NNTP-Posting-Date: Wed, 6 May 2009 11:37:56 +0000 (UTC) X-Mailer: Oberon Mail (ejz) on ETH Oberon (2.4.3) for Linux x86 X-Auth-Sender: U2FsdGVkX18k/vHqO6f/v/7irEzMjuprext5ooOl6hYzQBekoo3e9Q== Cancel-Lock: sha1:H/Xl8/ugtirimDbuQ2ZPJZh7wI0= Original-Path: news.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!oleane.net!oleane!feed.ac-versailles.fr!gegeweb.org!aioe.org!eternal-september.org!feeder.motzarella.org!motzarella.org!news.motzarella.org!not-for-mail Original-Xref: news.stanford.edu gnu.emacs.help:168934 comp.emacs:98130 X-Mailman-Approved-At: Wed, 06 May 2009 09:45:13 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:64208 Archived-At: someone wrote: > Anyhow, regular expressions can handle multiple lines just fine: > > A > theq() : > non > B > theq() : > > (save-excursion > (goto-char (point-min)) > (while (re-search-forward "\\(.*\\)\ntheq() :" nil t) > (message (match-string 1)))) > > will produce "A" and "B" I've had much difficulty in deleteing the multiple pattern repeating in file/s, which would need: delete all lines starting with line containing Str1 up until/including the line containing Str2, provided that N < number-of-lines-to-delete < M. PS Since I've suddenly found out how to chroot / I'm keen to try my [once looked at] GNU Emacs 21.3.1 !! I've found the powerfull: ^c h i leading to a massive verbose info, but can't find how to enter the: edit-eval-print cycle from emacs. Please advise, == Chris Glur. Although this NewsGroup still functions well, there are already many other previously good NewsGroups which have been crowed-out by the twittering-idiot-masses. To avoid further displacement of the NNT-protocol by the dumbed-down inefficient clik-blogs, we need to take a stand.