Removing everything except the numbers 1, 2, 3, 4, and 5 from a file
I want to remove everything from a file, such that only the numbers 1, 2, 3, 4, and 5 remain. Line breaks should be kept. How can I delete everything else from the file?
Removing everything except the numbers 1, 2, 3, 4, and 5 from a file
===

I want to remove everything from a file, such that only the numbers 1, 2, 3, 4, and 5 remain. Line breaks should be kept. How can I delete everything else from the file?