I have a text file containing approximately 25,000 lines. About 525kb.
Some lines have random text at the beginning. Some of them have long lines with a comma.
Some others have only three semi-colonies, followed by a space and optionally text on the same line. These are the lines that I want to delete.
Here is an example ....
;;; Updated Time 20120706122706 ;;; Generic DEveloper Output ;;; Some Random Comments ;;; I got some more... ;;; Yet another uneeded line ;;; Thanks for using StackOverflow <http:
----- etc.
As soon as it hits the first line with 4 or more; in the line I need the rest of the file, since there are no lines ";;;".
Trying to find something quickly, instead of reading the entire line and writing it back if it does not match ";;;".
A file is an ASCII text file (possibly UTF-8).
Any ideas?
Thank you for your time, help and knowledge.
source share