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: Michael Heerdegen
Subject: Re: How to grep for a string spanning multiple lines?
Date: Sun, 27 Nov 2022 08:31:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Jean Louis <bugs@gnu.support> writes:

> 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:]]\\)+"

`rx' has a keyword to mach any char (including whitespace), it's
called `anychar'.

Michael.




reply via email to

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