[dba-SQLServer] OT: global search and replace

Stuart McLachlan stuart at lexacorp.com.pg
Wed Nov 10 18:26:29 CST 2004


On 10 Nov 2004 at 23:09, Billy Pang wrote:

> just curious, does anyone have a tool they recommend for performing global 
> "search and replace" on text files?  preferrably can handle text files saved 
> in unicode text format.  and free :)
> 

Take a look at:
http://www.pricelessware.org/thelist/fil.htm#Search%20And%20Replace

I've also got a couple of free utilities on my website (for single files 
and not unicode though).

LineStrp:
 A utility to strip or modify lines from a text document (or text copied to 
the clipboard) if the lines contain a certain string ( or alternatively, if 
they don't contain the string) You can replace various parts of a matching 
line or remove it completely. Handy for extracting just the info you need 
from modem log files etc, stripping comments out of source code, changing 
multiple occurrences of a string throughout a file or stripping leading 
">"s from an email. Also lets you easily view the original and stripped 
files so that you can change your stripping options. Ver 1.5 also lets you 
remove empty lines. Version 2.0 adds a command line interface so that you 
can run Linestrip from a batch file

CharRepl:
A variation on LineStrip, this utility lets you remove or replace 
characters in any file, not just line delimited files. It can globally 
replace any byte values. You could for instance use it to replace every CR 
in a Unix text file and replace them with CR/LF pairs for use in 
DOS/WIndows. Also lets you easily view the original and stripped files, 
(text files only - view binary files at your own risk!)
-- 
Stuart





More information about the dba-SQLServer mailing list