 Search and Replace - A Python program by D.G. Sureau
 Open source - May 1 2000
 ----------------------------------------------------

 This program searches and (optionaly) replaces either an
identifier or a string, in a file, or in a set of files
matching a pattern.
 The pattern may contain wilcards which are those of MS-DOS
and Unix: * and ?

 Unlike fixcid - the script included in the Python distribution -
regular expressions are not allowed.

 The search can be performed case-sensitive or not.
 One can search for identifiers in C or Python source,
or any string in any ASCII text.

  By changing the "delimiters" string in the source, one can
change definition of what is identifier.
 The current setting doesn't include "#" among delimiters.


 The syntax is:
 --------------

 search [options] searching [replacing] filename

 1) Filename may contain wildcards, example:
  *.c
  name.*
  name?.py

 2) If the replacing text is ommitted, a simple search is performed.

 3) Options are those:

-i     case-insensitive for searched identifier.
-f     case-insensitive for filename. Defaults are case-sensitive.
-t     search for string. The default is search for identifier.
       The string may contain space. In this case it has to
       be inclosed inside "". Space is a delimiter, therefore
       identifiers always are single words.
-d     don't display when replacing. Default is display.

 4) Multiple options are packed into a single string as:
        -iftd


 Tips
 ----
 Removing strings from a text file may be performed by replacing
them by a blank space. Example:
    search -ft "searched" " " filename


