[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to grep for a string spanning multiple lines?
From: |
Jean Louis |
Subject: |
Re: How to grep for a string spanning multiple lines? |
Date: |
Sun, 27 Nov 2022 10:26:11 +0300 |
User-agent: |
Mutt/2.2.7+37 (a90f69b) (2022-09-02) |
(re-search-forward "friend.*\n.*while")
* Marcin Borkowski <mbork@mbork.pl> [2022-11-27 09:56]:
> 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...
Problem is so much less when using regular expressions, see above.
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
- Re: How to grep for a string spanning multiple lines?, (continued)
- Re: How to grep for a string spanning multiple lines?, Jean Louis, 2022/11/26
- Re: How to grep for a string spanning multiple lines?, Eli Zaretskii, 2022/11/26
- Re: How to grep for a string spanning multiple lines?, Jean Louis, 2022/11/26
- Re: How to grep for a string spanning multiple lines?, Michael Heerdegen, 2022/11/27
- Re: How to grep for a string spanning multiple lines?, Jean Louis, 2022/11/27
- Re: How to grep for a string spanning multiple lines?, Michael Heerdegen, 2022/11/27
- Re: How to grep for a string spanning multiple lines?, Jean Louis, 2022/11/27
Re: How to grep for a string spanning multiple lines?, Arthur Miller, 2022/11/26
Re: How to grep for a string spanning multiple lines?, Emanuel Berg, 2022/11/26
- Re: How to grep for a string spanning multiple lines?, Marcin Borkowski, 2022/11/27
- Re: How to grep for a string spanning multiple lines?,
Jean Louis <=
- Re: How to grep for a string spanning multiple lines?, Emanuel Berg, 2022/11/27
- Re: How to grep for a string spanning multiple lines?, tomas, 2022/11/27
- RE: [External] : Re: How to grep for a string spanning multiple lines?, Drew Adams, 2022/11/27
- Re: [External] : Re: How to grep for a string spanning multiple lines?, address@hidden, 2022/11/28
- RE: [External] : Re: How to grep for a string spanning multiple lines?, Drew Adams, 2022/11/28
- Re: [External] : Re: How to grep for a string spanning multiple lines?, Emanuel Berg, 2022/11/30
- Re: [External] : Re: How to grep for a string spanning multiple lines?, Stefan Monnier, 2022/11/28
- Re: [External] : Re: How to grep for a string spanning multiple lines?, Emanuel Berg, 2022/11/28
- Re: [External] : Re: How to grep for a string spanning multiple lines?, Emanuel Berg, 2022/11/28
Re: How to grep for a string spanning multiple lines?, Emanuel Berg, 2022/11/27