I have a file containing integers (line numbers) and text. By extracting a PDF-file those line numbers got put into seperate lines from the text and I want to delete all those line numbers. I'm not very skilled with regexes but I'm 100% sure that it shouldn't be super hard. I use vim/nvim, but if I had to use awk/sed that would work for me, too.
File looks something like this:
123 124 125 Text was found in those three lines should stay
So ideally I want to search for: all lines, that start with a positive integer (1,2,3...123456) and contain nothing but that integer. They should be deleted.
Any help is much appreciated.
Bonus challenge: for some reason, some lines start with
^L1234, so there's an additional special character. At some point I'd want to delete these as well. Can be separate steps though.