If you're on Windows, try findstr
. Third-party tools are not needed:
findstr /V /L "searchstring" inputfile.txt > outputfile.txt
It supports regex's too! Just read the tool's help findstr /?
.
P.S. If you want to work with big, huge files (like 400 MB log files) a text editor is not very memory-efficient, so, as someone already pointed out, command-line tools are the way to go. But there's no grep on Windows, so...
I just ran this on a 1 GB log file, and it literally took 3 seconds.