For all those UNIX people out there, "grep" should need little introduction. It is simply a powerful tool for extracting lines from files. This is the GUI version for Windows.
To those of you who don't know UNIX, "grep" looks for lines matching a regular expression in a file, and if it finds a matching line, then it outputs it to a new file. For an explanation of "regular expressions " please examine the VB help on the " Like " operator."
For example if I have a file containing the lines:
good Morning
and how
are
you?
good Afternoon
and Goodbye!
..And put the following regular expression into WinGrep and run it: "Good"
..then the following lines will be added into the output file:
good Morning
good Afternoon
and Goodbye!
Up to 10 Regular expressions may be specified in WinGrep by putting semicolons between the Regular expressions. For example, if I was looking for either the words "Good" or "you" then my regular expression would be: "Good;you" and my output would be:
good Morning
you?
good Afternoon
and Goodbye!
Characters in pattern Matches in string:
? Any single character.
* Zero or more characters.
# Any single digit (0-9).
[charlist] Any single character in charlist.
[!charlist] Any single character not in charlist.
I know this help file is short - if you need any more information you can contact me at bigcalm@hotmail.com
Bug fixes, Improvements, and Suggestions are most welcome too.
New functionality for Version 1.1
Pre-Post line extraction
Counting facility
Find-Files is now finished.
Numerous minor bug-fixes.
New functionality for Version 1.2
UNIX Command Line style text box for those moving to WinGrep from Unix or Dos Grep
Load and Save searches
"HOT" (quick search) buttons for those regular searches (registry keys)
Can be run from the command line and explorer. i.e. It processes it's arguments, and now runs using a Sub Main() procedure.
Post-extraction works correctly now.
I've put some comments into the Grep functions, 'cos they were getting horribly complex.
Silent modes for command line running
Example files included.
New functionality for Version 1.3 (bug fixes mainly).
If JustCountThem And DisplayFileNames = OncePerFile then don't have any output if matches = 0 for that file
More than 10 regular expressions! I thought 10 was easily enough, but no.
Improved modularity using compiler directives.
Removed disgusting common dialog and listview hacks (and replaced with ones almost as bad, sigh).
Numerous bugs in WorkOutGrepCommand() and PropagateUp() fixed.
Move to using Windows temp directory for default output files, and add cleardown routine.
Multiple concurrent searches (in different applications).
Automatic registration of script files for use with explorer.
Further improvements that people have asked for....
Awk! (They don't ask for this directly, but practically, an Awk scripting language is what they need). - They can bog off unless they offer me a fat cheque or some seriously good parsing code or source code for a compiler (not fussy which language, excepting Prolog and LISP).