0

Windows 10, Emacs 25.1 Suppose I has the next text

111111111111111111

hello

22222222

aaaahello

3333333333333333333333333333333

aabbbbbbbbhellocccccdddddddd

aaaaaaaaaaaaaaa

cccccccccccccccc

dddddddd

rhellorraaaa111111111

I want to delete all rows that contain text hello. How I can do this? Thanks.

2

You can use the command delete-matching-lines via

M-x delete-matching-lines RET hello RET.

Note that tab-expansion helps a lot with typing command names at the minibuffer. You just need to type

M-x dele TAB ma TABRET hello RET.

  • I use helm mode. It's show all commands. It's very helpful. Thanks. Command "delete-matching-lines" work fine. – a_subscriber Jul 11 '18 at 8:37
  • 2
    In case anybody is wondering, delete-matching-lines is an alias for flush-lines. I came here to recommend that solution and then discovered that they are the same. – MTS Jul 11 '18 at 17:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.