[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: |
Sat, 26 Nov 2022 12:06:20 +0300 |
User-agent: |
Mutt/2.2.7+37 (a90f69b) (2022-09-02) |
* Eli Zaretskii <eliz@gnu.org> [2022-11-26 12:00]:
> > Date: Sat, 26 Nov 2022 11:43:47 +0300
> > From: Jean Louis <bugs@gnu.support>
> > Cc: help-gnu-emacs@gnu.org
> >
> > Because "[[:space:]]+" does not include "\n" that I know:
>
> Read its documentation carefully, and you will realize that whether it does
> or doesn't include a newline depends on the syntax table of the current
> buffer.
Thanks.
It means it is not to be used to search for new lines in program, as
programs may not have syntax tables.
Then this is solution:
(rx (one-or-more (or "\n" (any whitespace)))) ➜ "\\(?:
\\|[[:space:]]\\)+"
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
- How to grep for a string spanning multiple lines?, Marcin Borkowski, 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?, tomas, 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?, Eli Zaretskii, 2022/11/26
- Re: How to grep for a string spanning multiple lines?,
Jean Louis <=
- 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