help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to grep for a string spanning multiple lines?


From: Marcin Borkowski
Subject: Re: How to grep for a string spanning multiple lines?
Date: Sun, 27 Nov 2022 07:54:52 +0100
User-agent: mu4e 1.1.0; emacs 29.0.50

On 2022-11-26, at 15:55, Emanuel Berg <incal@dataswamp.org> wrote:

> Marcin Borkowski wrote:
>
>> I remember that someone in some video said something, and
>> I want to find that part. However, it turns out that it is
>> split between two (or more) lines.
>
> (re-search-forward ";; Hello my friend\n;; stay a while, and listen")
>
> ;; Hello my friend
> ;; stay a while, and listen

Well, that's obviously cheating.  The real problem is how to search when
you have no idea where you have spaces and where you have newlines...

-- 
Marcin Borkowski
http://mbork.pl



reply via email to

[Prev in Thread] Current Thread [Next in Thread]