Community
    • Login

    How to Delete Searches Instantly?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 248 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.
    • Meтe ЯлчынкаяM
      Meтe Ялчынкая
      last edited by

      Hello all, hope you doing well, I need help with something. So I searched for a letter, and the result is almost 4000 found. I want to delete all lines which include “#” how do I gonna do that? Is there anything to do that instantly?_C__Users_ymete_Desktop_cheat.db - Notepad++ 4_18_2021 7_20_47 PM.png

      1 Reply Last reply Reply Quote 0
      • guy038G
        guy038
        last edited by

        Hello, @meтe-ялчынкая and All,

        Very easy with regular expressions or bookmarks !

        • A) With bookmarks :

          • Open the Mark dialog ( Ctrl + M )

          • SEARCH #

          • Untick all the options

          • Tick the Bookmark line option

          • Tick the Wrap around option

          • Click on the Mark All button

          • Then, run the menu option Search > Bookmark > Remove Bookmarked Lines


        • B) With regular expressions ( faster ! )

          • Open the Replace dialog ( Ctrl + H )

          • SEARCH (?-s)^.*#.*\R

          • REPLACE Leave EMPTY

          • Untick all the options

          • Tick the Wrap around option

          • Click on the Replace All button

        The search regex searches, from beginning of line ( ^ ) for any range of standard characters, even none ( .* ), followed with a # char, and again, with any range of standard characters, even none( .* ), till the EOL characters of current line ( \R )

        Best regards

        guy038

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