Home

Line Number Stripper

A simple desktop Java app to automate removal of those pesky line numbers you sometimes find at the beginning of lines of code snippets which you want to run to test function or modify.

Processes lines with the following format:
     possible spaces
     line number        --removes
     possible period(s) and/or colon(s)   --removes
     ...followed by line of code, possibly preceded by spaces

Should work for any language that does not allow numbers at the beginning of actual code (as I think is the case for Java).

I didn't think to check for pre-existing web apps for this online first, or hadn't used good enough search terms if did. It turns out there are at least several, of course, and many are slicker and more elaborate than this, probably covering more possible formats etc! [Some do not remove colons, though. Also, I have added an option to discard lines lacking line numbers when processing, which may be useful if headers/footers are picked up when copying code that spans pages in digital textbooks.] Anyway, on the off-chance that this Java desktop app is of some use to someone, it can be executed on Java-enabled devices after downloading by clicking

here

- just paste your code in the app window and click on the Strip button above it.