Subject: Re: bug#31796: 26.1; dired-do-find-regexp-and-replace fails to find multiline regexps

From: Noam Postavsky <[email-masked]>
Date: Tue, 12 Jun 2018 06:17:28 -0400

Žygimantas Bruzgys <[email-masked]> writes:

> 1) Create ~/test with a file with following contents:
> multi
> line
>
> 2) Visit directory using dired: C-f ~/test
> 3) Initiate regexp-replace by hitting Q
> 4) multi[[:space:]]line RET singeline RET
> 5) See that dired regexp replace failed reporting that no results were
> found
> 6) Visit a file you have just created.
> 7) Initiate query-replace-regexp with C-M-%
> 8) Accept the suggested (previous) query-replace by hitting RET
> 9) See that the query is actually correct and finds the result.

As the docstring of dired-do-find-regexp-and-replace says:

    REGEXP should use constructs supported by your local ‘grep’ command.

grep matches single lines, so multiline matching won't work.