Community
    • Login

    How to remove a specific range of row regardless of blank/empty lines using regex?

    Scheduled Pinned Locked Moved General Discussion
    3 Posts 2 Posters 234 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.
    • lightning speedL
      lightning speed
      last edited by

      Hi there,
      How to remove a specific range of rows, for example, need to remove lines 2-5 regardless of blank/empty lines or lines containing info. Many thanks

      Before

      1. 1a@3536
      2. 123abc@
      3. abc!153
      4. #@!af35
      5. ff@#123
      6. wt3ef@1
      7. 3*^tu12

      After

      1. 1a@3536
      2. ff@#123
      3. wt3ef@1
      4. 3*^tu12
      Paul WormerP 1 Reply Last reply Reply Quote 0
      • Paul WormerP
        Paul Wormer @lightning speed
        last edited by

        @lightning-speed Find: (?-s)\A(.*\R){1}\K(.*\R){4} Replace: empty field

        lightning speedL 1 Reply Last reply Reply Quote 2
        • lightning speedL
          lightning speed @Paul Wormer
          last edited by

          @Paul-Wormer
          It’s works perfectly. Many Thanks

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