• Login
Community
  • Login

delete all words/lines containing "__" keybind?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 2 Posters 269 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.
  • S
    Samuel Connault
    last edited by Samuel Connault Oct 26, 2024, 5:54 AM Oct 26, 2024, 5:54 AM

    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!

    A 1 Reply Last reply Oct 26, 2024, 10:31 AM Reply Quote 0
    • A
      Alan Kilborn @Samuel Connault
      last edited by Oct 26, 2024, 10:31 AM

      @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…

      S 1 Reply Last reply Oct 26, 2024, 11:02 AM Reply Quote 3
      • S
        Samuel Connault @Alan Kilborn
        last edited by Oct 26, 2024, 11:02 AM

        @Alan-Kilborn
        tysm it worked!

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