bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find multilin


From: Juri Linkov
Subject: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find multiline regexps
Date: Tue, 01 Dec 2020 10:36:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> It is possible to combine with sed:
>> https://www.gnu.org/software/sed/manual/html_node/Text-search-across-multiple-lines.html
>> https://www.gnu.org/software/sed/manual/html_node/Multiline-techniques.html#Multiline-techniques
>
> It's pretty much Chinese to me, sorry.

When I need to grep in multi-line mode I use Ruby, but its modifiers
differ from Perl:

https://regular-expressions.mobi/ruby.html
  /m makes the dot match newlines.  Ruby indeed uses /m, whereas Perl and
  many other programming languages use /s for “dot matches newlines”.

https://www.regular-expressions.info/modifiers.html
  (?s) for “single line mode” makes the dot match all characters,
       including line breaks.  Not supported by Ruby or JavaScript.
  (?m) for “multi-line mode” makes the caret and dollar match at the start
       and end of each line in the subject string.  In Ruby, (?m) makes the
       dot match all characters, without affecting the caret and dollar which
       always match at the start and end of each line in Ruby.





reply via email to

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