How do I delete only the second line from multiple text files?
-
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-052311.txt
1-2023-11-01
2-2023-11-02
3-2023-11-03
4-2023-11-04
5-2023-11-05 -
Find:
(?-s)\A.*\R\K.*\R
Replace: nothing
Search mode: Regular expression
Action: Replace-in-Files
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