Community
    • Login

    How do I delete only the second line from multiple text files?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 336 Views 1 Watching
    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.
    • 한승호한 Offline
      한승호
      last edited by

      Hello. I have several text files like the one below, and I only want to delete the content of the second line.
      What should I do?
      I tried to find a solution, but none of the answers worked for me.
      Please help me…

      2310.txt
      1-2023-10-01
      2-2023-10-02
      3-2023-10-03
      4-2023-10-04
      5-2023-10-05

      2311.txt
      1-2023-11-01
      2-2023-11-02
      3-2023-11-03
      4-2023-11-04
      5-2023-11-05

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA Offline
        Alan Kilborn @한승호
        last edited by

        @한승호

        Find: (?-s)\A.*\R\K.*\R
        Replace: nothing
        Search mode: Regular expression
        Action: Replace-in-Files

        1 Reply Last reply Reply Quote 4

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors