Community
    • Login

    delete all words/lines containing "__" keybind?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 172 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Samuel ConnaultS
      Samuel Connault
      last edited by Samuel Connault

      hello, i was wondering if there was a keybind that would delete every word or line containing a specific letter or word. This would be a huge help for some things. thanks!

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @Samuel Connault
        last edited by

        @Samuel-Connault

        No, but you could create a replacement macro and then assign that to a keycombo.

        Start with this replacement, assuming your word is foo and you want to match its case, i.e., you don’t want to match FOO or Foo, only foo:

        Find: (?-is)^.*?foo.*\R
        Replace: make sure this box is empty
        Options: Wrap around, Regular expression
        Action: Replace all

        This would match food and other parts of words containing foo as well, but if you don’t want that there are ways around it…

        Samuel ConnaultS 1 Reply Last reply Reply Quote 3
        • Samuel ConnaultS
          Samuel Connault @Alan Kilborn
          last edited by

          @Alan-Kilborn
          tysm it worked!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors