home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of Windows 95.com 1996 September
/
WIN95_09964.iso
/
text
/
fdstr95.zip
/
FIND95.TXT
< prev
next >
Wrap
Text File
|
1996-07-07
|
7KB
|
138 lines
Find String Application Synopsis for Windows 95/NT
The multiline Find String application was built to allow application
developers, html writers, system/network administrators, and others
to find a key word or phrase in many lines of many text files quickly
and efficiently. The application supports DOS file like wildcards
or a limited set of UNIX like Regular Expressions in the Find String.
Application developers can, for example, wire it into the
Microsoft C++ visual work bench through its Options/Tools menu to
enrich the editing capability by allowing them to find all instances
of a key word or phrase in their project. It can also be used
stand-alone by developers, html writers, administrators et. al. who
need to find a piece of information in one or more lines of many
files located in a multiple directories. Once found, by double
clicking on the file or file line, you can launch the editor of your
choice (notepad by default) to manipulate the data. Find String,
will in addition to launching an editor, supply the line number to
the editor if instructed to do so and will allow command line parameters
if required. For those folks like me, who can not remember where they
defined a variable 20 minutes ago, it's essential.
Selecting Files to Search
Find String supports two methods of defining the file set to search.
The first method allows you to select as many files from as many
directories via an extended file dialog as you want the application
to search. This method is supported whether or not you have
registered the application. The second method allows you to specify
a start directory and file filter. This method is only supported for
registered customers. If you have registered the application, you
can use both methods to specify the file set to search.
Multiline Searches
Find String supports multiline searches and searching for special
characters. The supported special characters are displayed in a list
in the lower left corner of the Find String Dialog. Just double
click on the special character you wish to search for and it is
automatically added to the end of the Find String Line. To search
for a literal (e.g., \n) use the \\ (e.g., \\n).
Special Characters
Find String supports usage of a set of non-printable characters that
may be embedded within the string pattern. These special characters
are:
\r\n DOS end-of-line;
\n new line which is the UNIX end-of-line;
\r carriage return;
\t tab;
\v vertical tab;
\f formfeed (also paragraph indicator)
\a bell; and
\b backspace.
Regular Expressions
Find String supports the definition of group/set/character
expressions for licensed customers. The supported regular
expressions conform closely but not exactly to the UNIX standard.
The application does not support:
o nested groups within groups or sets within sets;
o the beginning (\<) or end of word (\>) constraints;
o definition of your own range constraints (\{m,n\});
o definition of substring registers (\n});
o non-escaped literal brackets [ or ] within a set;
o non-escaped literal parentheses ( or ) (interpreted as group
indicators unless escaped with a \); and
o iteration characters associated with groups.
DOS file like Wild Cards
Find String supports the definition of the ? and * file like wild
cards for licensed customers. The ? means match any single character
while the * means match one or more characters until succeeding match
characters are encountered (e.g., ab*v ) or, if the last character,
to the end-of-line (e.g., ab*).
Display Limitation
The application was designed to handle a huge number of files from
multiple directories. There is a display limitation that will limit
the number of files you can search at one time. The display
limitation is 128,000 lines, consequently, if 95 lines are found per
file (96 display lines), the file limitation would be about 1,300
files. The application will stop the search operation when the line
limitation is reached.
Windows 95 Customers
With Windows 95, I had hoped that the display limitations for list
boxes et. al. would no longer be a concern. In fact, I assumed that
only to find out that I can only display 32767 lines in a list box.
As a result, only 32000 lines are displayed per display frame. To
overcome this limitation, I allow you to switch display frames using
the Up (yellow) and Down (cyan) arrow buttons on the tool bar or
selecting the Next/Previous Display Frame option from the View Menu.
For those of you who have NT, forget this paragraph.
Find String Remembers
Find String remembers the first directory searched and will default
to that directory on the next invocation. Additionally, Find String
will save up to the last 100 (20 by default) search strings and allow
you to reuse those stings on subsequent invocations. For those of
you who want a constant start position on your desktop, Find String
remembers its last size and desktop position and will restore itself
to that size and position until you change it. If you position it
partially or fully off the desktop, it will restore itself fully on
the desktop.
Newline in Files Required
The application expects to find a newline character, as a minimum, at
the end of each line and will not process files that are not
constructed in this manner. Files generated by word processors are
not guaranteed to fall into this category unless they are saved in
ASCII/text. When the application encounters such a file, it warns
you and excludes that file from any further search. The search
string is limited to 1024 characters and the maximum number of
characters per searched line is limited to 2048.
Multiple Editors
If you wish to maintain multiple editor capabilities and segregate
your remembered find strings, you may pass Find String a command line
argument specifying the full path to a different ini file (unless the
ini file is in the windows directory and then only the name of the
ini file is required (e.g., my.ini).
UNIX File Types
In today's networking environment, many files can be manipulated on
foreign machines. The UNIX file type is supported automatically for
those who need to remotely find a key word or phrase in text files
that conform to the UNIX file standard, assuming of course, that you
have that capability. UNIX file types are NOT supported
automatically when you choose regular expressions. The application
must know how to treat the $ end-of-line character prior to starting
the search. When you check the regular expression box, the UNIX File
Type box will become active. Check it if you are using the $ in the
expression.
The application is easy and safe to use, just type in or select a
previous string, select whether or not you want it to match case
and/or be a whole word, select one or more files you want it to
search, and Begin!