[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to grep for a string spanning multiple lines?
From: |
Emanuel Berg |
Subject: |
Re: How to grep for a string spanning multiple lines? |
Date: |
Sun, 27 Nov 2022 14:48:52 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
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...
Okay, I didn't understand ... you want to search for something
you or someone else said (wrote), but you only remember the
words, not punctuation, whitespace etc?
It can be done with regular expressions of course, but ...
I wonder if it isn't better to have some "inexact" search
algorithm which quantifies the proximity or score of each
inexact hit in a set of results, so that - if I just make
things up for a possible search for "Hello my friend" in
a body of text where it doesn't quite exist - it could produce
fallout such as
results score
-----------------------
Hello my Fräulein 89%
Hello MySQL 28%
Go to Helvetia 3%
Because the advantage would then also be that even the words
wouldn't have to be exact!
Interesting, I'd like that myself very much!
Do we have that?
--
underground experts united
https://dataswamp.org/~incal
- Re: How to grep for a string spanning multiple lines?, (continued)
- 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, 2022/11/27
- Re: How to grep for a string spanning multiple lines?,
Emanuel Berg <=
- 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