[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: extract lines with regexp
From: |
no-toppost |
Subject: |
Re: extract lines with regexp |
Date: |
Wed, 6 May 2009 11:37:56 +0000 (UTC) |
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 /<emacs'Partition>
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.