My beloved TextPad says "out of memory" after a while when trying to perform this operation. Next best (i.e. simplest/fastest) free tool to do this?
2 Answers
Install ActivePerl (only 25MB .msi
file) and run this one-liner:
perl -pe "s/regex/replacement/g" <input.txt >output.txt
You can even use it for in-place editing like this:
perl -pi.bak -e "s/regex/replacement/g" file.txt
-
I just happened to have Perl installed. Thanks! (@fcorrao I also +1'd you)– KevApr 2, 2013 at 13:23
Install cygwin and use sed to perform the search and replace.
e.g. sed -e 's/findthis/replacewiththis/g' < /path/to/bigfile > /path/to/newfile