(This is GREPHIST.htm in plain text. If you have a Web browser,
you will find that HTML version much easier to read. It has the same
text but is better formatted and contains many helpful hyperlinks.




GREP -- Find Regular Expressions in Files
Revision History for Release 8.0

   Program Dated 4 May 2005  /  This Document Dated 4 May 2005
   Copyright  1986-2005 Stan Brown, Oak Road Systems

   Summary:  This document is the complete revision history, starting
   with the most recent changes. To use GREP, please see the GREP Quick
   Start and the GREP Manual.

   Contents:
   Release 8.0, 5 May 2005
   Release 7.52, 17 Jan 2005
   Release 7.51, 29 Dec 2004
   Release 7.5, 19 Dec 2004
   Release 7.41, 30 Oct 2004
   Release 7.4, 23 Oct 2004
   Release 7.31, 8 Jul 2004
   Release 7.3, 5 Jul 2004
   Release 7.2, 13 Jan 2003
   Release 7.11, 29 Apr 2002
   Release 7.1, 27 Mar 2002
   Release 7.01, 10 Feb 2002
   Release 7.0, 21 Jan 2002
   Release 6.9, 22 Dec 2001
   Release 6.0, 8 Sep 2001
   Release 5.33, 19 Aug 2001
   Release 5.32, 20 May 2001
   Release 5.31, 18 April 2001
   Release 5.3, 17 April 2001
   Release 5.2, 4 Jan 2001
   Release 5.1, 31 May 2000
   Release 5.0, 7 May 2000
   Release 4.5, 25 Sep 1999
   Release 4.4, 18 Sep 1999 (limited release)
   Release 4.3, 4 Aug 1999
   Release 4.2, 20 Feb 1999
   Release 4.1, 22 Jan 1999
   Release 4.0, May 1998
   Release 3.4, March 1998
   Release 3.3, Feb 1998
   Release 3.2, June 1997
   Release 3.1, Jan 1997
   Release 3.0, Dec 1996
   Release 2.4, April 1990
   Release 2.3, March 1990
   Release 2.2, Jan 1990
   Release 2.1, Dec 1989
   Release 2.0, July 1989
   Release 1.0, April 1986

Release 8.0, 5 May 2005

   New features:
     * The new letter /o option lets you specify output format
       independent of input format.
       Compatibility note: Release 8.0 changes the default output format
       for text lines (not paragraphs). Earlier releases simply dumped
       the input lines navely. Release 8.0 displays control characters
       in ^letter format and other non-printing characters in <nn>
       format. In most cases this is a good thing, but if you want the
       old behavior specify the /o1 option on the command line or in the
       environment variable.
     * The functions that read text files were completely overhauled. Now
       GREP recognizes line terminators in DOS, UNIX, or Macintosh-format
       files; and Control-Z and NUL are treated like any other
       characters. This affects paragraph mode (/G2 option) and both line
       modes (/G0 or /G1 option). I'm grateful to Scott Brueckner for an
       excellent set of test cases in his Reading Text Files in C.
       Although I didn't use any of his C code, I did benefit greatly
       from his research into the issues with the standard C library.
       With the /G0 option (fixed-width text lines), earlier releases of
       GREP would chop the line into chunks of txwid+1 characters as
       specified in the /W option; release 8.0 chops the line into chunks
       of exactly txwid characters.
     * The /P option (show context lines) was previously illegal with the
       /R3 option. Now, GREP32 /J /R3 /Pb,a supplies context in bytes, up
       to b bytes before and a bytes after. (The /J option is required.)
     * When GREP prompts you to enter input files, regexes, or input
       lines at the keyboard, it now tells you the maximum length of
       input allowed.
     * The exit status is now displayed with the numbers of hits and
       files.
     * If you specify the new /3 option, then GREP will set the return
       value to 3 if there are warnings but no errors.
     * The debug message (/D option) at the end of each file now gives
       you both the item count and the line or byte count.

   Bugs fixed:
     * Two long-standing bugs in basic regexes (unnoticed since May
       2000!) were discovered and fixed: the regex .* wasn't matching an
       empty line, as it should; and the naked dollar sign $, which
       should match every line, wasn't matching any. (Extended regexes,
       /E2 option, were not implicated.)
     * Release 7.5, if you used the /U option, /N option, /R2 option, and
       /P option all used together, failed to distinguish visually
       between records that contain matches and records displayed for
       context. As in previous releases, in release 8.0 a colon follows
       the file name only for the records that contain matches.

   Other program changes:
     * With the /N option in paragraph mode (/G2 option), GREP now
       displays the line number followed in parentheses by the
       paragraph number. Also with the /N option, byte numbers from
       free-format binary files (/R3 option) are now prefixed with B
       to distinguish them from line numbers.
     * The /X option exclusions now apply only to input filespecs that
       contain wildcards. The idea is that if you explicitly specify a
       single file without wildcards, you must want GREP to process it.
       (Previously, if the environment variable contained /X*txt and you
       typed grep warning prog.txt on the command line, GREP would ignore
       the prog.txt input file because it matched the exclusion.)
     * The pseudo-file NUL is now ignored. (Previously, GREP interpreted
       it as an interactive device.)
     * When input is redirected from file or piped from another command,
       GREP now ignores the /R option.
     * The binary buffer size (/W option) must be an even number with the
       /R3 or /R-1 or /R-2 option. Previously, GREP enforced this
       requirement by means of a fatal error. Now, GREP displays a
       level-1 warning, adjusts the binary width to the next even number,
       and continues.
     * With fixed-length records (/R2 option), GREP now warns you if the
       last record is short, which could mean the /W option option wasn't
       specified correctly.
     * The warning "^ and $ are not recommended in a basic regex with
       /R3" (or /R -1 or /R -2) was eliminated because it didn't always
       appear when it should and often appeared where it shouldn't.
     * The nag message at the beginning of the unregistered version was
       shortened.

   Documentation changes:
     * The help message (grep /?) is now much more explicit about the /0
       or /1 option, and reserved modes /G3 and higher are no longer
       mentioned. The placement of "(default)" is now uniform.
     * The interactive tour never got thoroughly tested under Windows XP
       because I didn't have free access to an XP system until early
       2005. Caret (^) characters in regexes were a particular problem.
       Now the tour should work in DOS 5.0 through Windows XP.
     * The GREP Manual now explains how to run GREP from the Windows
       desktop.
     * In the GREP Manual, the terms standard input, standard output, and
       standard error are now defined; and uses of those terms are cross
       referenced to the definitions. Similarly, the GREP Manual now
       defines whitespace characters; and uses of the terms hits,
       filespec, and wildcard now link to the definitions of those terms.
     * The 0README.1ST file was reorganized, and a few usage notes were
       added.

Release 7.52, 17 Jan 2005

   The TOURKEY program (see release 7.51) was compiled with a 16-bit
   compiler to keep it small. It worked fine on my Windows XP Pro, but a
   user reported that it didn't work on his. I recompiled it with a
   32-bit compiler. Also, though TOURKEY isn't intended for standalone
   use, I added a program identification and help message if you run it
   with the /? option.

   In the tour itself, I simplified the regex used with GREP32 to
   illustrate paragraph mode .

   The GREP executables and the other documentation are unchanged from
   release 7.5.

Release 7.51, 29 Dec 2004

   Following a report that the tour didn't work in Windows XP, I
   investigated and found that the default installation of Windows XP
   doesn't have the CHOICE program, which the tour uses to get
   instructions from the user. I wrote a workalike, TOURKEY, which is now
   included with the distribution.

   The executables and documentation are unchanged.

Release 7.5, 19 Dec 2004

   Program changes affecting text files:
     * The new /G2 option makes GREP search paragraphs rather than lines.
       This is very handy for text files where a match might begin on one
       line and end on a later line; it's also a more flexible way to
       show context than the /P option.
     * You no longer need to preset the text width (first number in the
       /W option): GREP now allocates memory dynamically to take in any
       length of text line. (This change affects GREP16 users much more
       than GREP32 users, because the default line length was already
       very large in GREP32.) If you really want the old behavior, where
       GREP chops lines in the middle at the stated width, use the new
       /G0 option.
     * Large text files should now be processed about 16% faster than
       before. (I benchmarked read speeds for pairs of identical 7 MB
       files that, to the best of my understanding, were not cached.)

   Program changes in the handling of multiple regexes (/F option) with
   the /J2 or /J3 option:
     * GREP now reports all matches in the order they occur on the input
       line. (Previously, within any given line or buffer GREP first
       reported all matches for the first regex in the /F file, then all
       matches for the second regex, and so on.)
     * With multiple regexes, the /J2 option (display all matching parts
       of the line, without overlaps) was documented in release 7.4 to
       report overlaps of matches for different regexes but not overlaps
       of matches for the same regex. Now, GREP /J2 won't display a given
       part of the input more than once, even if it matches more than one
       regex.

   The above two changes don't affect single regexes with the /J2 or /J3
   option.

   Other program changes:
     * There is a new format for binary output, a change that was
       overwhelmingly favored in a GREP user poll. Previously, binary
       output was the same as text output except that non-printable
       characters were replaced by a hex representation in < > angle
       brackets. Now, binary output shows a hex dump and text
       representation side by side; with non-printable characters
       represented by dots.
     * Line numbers and /C option counts can now go as high as 2^32 -1,
       which is 4,294,967,295 (an unsigned long), after which they will
       silently roll over to 0. Previously, GREP16 counts went to 32,767
       and GREP32 counts went to 2,147,483,647, after which they silently
       rolled over to negative numbers. (Thanks to Scott McEndree for the
       suggestion.)
     * Prompts are now written to the standard error output. This affects
       prompts for regexes (/F- option) and files (/@- option) and lines
       to test (if no input files are specified). Previously they were
       written to the C library "console", which on some systems gets
       redirected along with standard output.
     * In the debug output (/D option), messages about memory allocation
       are now headed "grep GA". Previously they were distributed among
       the other categories.
     * Some warnings about combinations of command-line options used to
       be displayed before the program logo. Now the logo is displayed
       first.
     * The unregistered version now displays a request for feedback at
       the end of execution. Also, about one time in a hundred it
       requires a keypress at the start of execution.

   Documentation changes (in addition to descriptions of the program
   changes):
     * Thanks to Matthew Miner, the download now includes a Quick
       Reference Card for GREP. The MS-Word file GREPQRC.DOC prints on A4
       or 811 paper.
     * The interactive demo, TOUR.BAT, used to fail if you renamed
       grep32.exe or grep16.exe to grep.exe as the GREP Quick Start
       recommends; now the tour runs. Ilustrations of the /G2 option and
       the new binary format are now included.
     * A new chapter called Future Directions was added to the GREP
       Manual.
     * A note was added to the GREP Manual about optimizing the order of
       multiple regexes in a file.
     * Redirecting output with >outputfile makes GREP hang up! was added
       to the Troubleshooting and How-To section of the GREP Manual.
     * The questions in the Troubleshooting and How-To section of the
       GREP Manual are now listed in the table of contents.
     * At a user's request, the two CSS files in the distribution were
       renamed to begin with GREP. If you unpack GREP over a previous
       release, you should manually delete the old files print.css and
       screen.css.

Release 7.41, 30 Oct 2004

   This release fixes two bugs that were introduced in release 7.4. Both
   have to do with the /J2 or /J3 option:
     * GREP 7.4 had a problem with reading a partial buffer to replace a
       partially used buffer in a binary file. This could result in over-
       or under-reporting matches if you used the /R3 option with /J2 or
       /J3. This was not an issue if your buffer was large enough to hold
       the file as recommended.
     * GREP 7.4 counted matches wrong for all file types with the /J2 or
       /J3 option. Specifically, the counts reported with the C option
       and the summary at the end were the sum of the number of matches
       and the number of lines containing matches, instead of just the
       number of matches. (Counts with the /J1 option or with no /J
       option were correct.)

Release 7.4, 23 Oct 2004

   Program changes:
     * The /J option is now a numeric option /J0 through /J3. When a
       line, record, or buffer contains one or more matches, you can now
       tell GREP to display the entire line, only the first matching
       part, or every matching part with or without overlaps.
     * The /Y option and /J option options make no logical sense
       together. Previously GREP tried to make sense of the combination;
       now it's just not allowed.
     * The /C option and /K option are now allowed together. Perhaps you
       might want to count matches in the file without displaying them,
       but stop reading a big file if the number of hits reaches a
       certain value.
     * GREP now displays a grand total of the number of matches, number
       of files containing matches, and number of files examined. (GREP
       with the /L option displays the number of files containing matches
       and the number of files examined.) This new information is written
       to the standard error stream, so that it won't interfere with any
       processing you do of the redirected output; and you can suppress
       it entirely with the /Q option.
     * Previously, if you supplied GREP a directory name with trailing
       backslash, it didn't find any matching files. Now it assumes *
       after a trailing backslash in a filespec.
     * The tour (TOUR.BAT) now lets you quit at any point, without
       answering N to every offered demonstration.
     * bug fix: GREP /R3 /J /N was displaying the byte number of the
       start of the buffer. Now it displays the byte number of the start
       of the match, as it should.

   Document changes:
     * The GREP Manual describes the redesigned /J option. In addition,
       with the new /J2 and /J3 selections there are some changes to how
       free-format binary files are read (/R3 option) and to the
       recommended buffer width (/W option).
     * The list of options in the GREP Quick Start now shows UNIX -o as
       equivalent to the /J option.
     * The GREP Manual now warns you if you read it without its
       associated CSS style sheets. They provide helpful formatting and
       spacing, particularly in tables of regexes and options.

Release 7.31, 8 Jul 2004

   Program change: Add a warning in the help message about regexes that
   start with - or /, in response to a user's question.

   Documentation changes:
     * Add the above warning to the GREP Manual in the section on
       regexes.
     * Add a quick reference table of special characters to the regex
       overview in the GREP Manual.

Release 7.3, 5 Jul 2004

   Program changes:
     * GREP no longer strips off a pair of quotes that enclose a regex.
       Recent versions of DOS appear to do this automatically, and
       therefore you should see no difference in final processing. What
       will be different is that now it becomes easier to specify a regex
       that contains quotes, such as \"something\".
     * If you specify a directory name as an input file, GREP no longer
       displays a warning and ignores it, but now scans all files in that
       directory.
     * Debug output was improved: command-line arguments are now
       numbered, and regexes are no longer quoted in the debug output.
     * Exactly one error message, "character class never ended", ended
       with a period; it's now consistent with the rest. "Unsupported
       locale" became "unsupported locale in M option". "The E3 option is
       accepted for E2 plus J" became "the E3 option is treated as E2
       plus J".

   Documentation changes:
     * The user guide and reference manual were reorganized from the
       ground up, into a GREP Quick Start targeted at new users and a
       large self-contained GREP Manual with full information on all
       topics. Previously, the main discussions of binary files,
       subdirectory searches, and ERRORLEVEL were in the user guide, and
       some discussions were split between the two documents. Now,
       experienced users need search only the GREP Manual to answer any
       question.
     * For the first time in a couple of years, both documents were
       reread beginning to end. A few small errors were corrected, and
       many clarifications and hyperlinks were added.
     * Navigation in the GREP Manual should now be much easier. Sections
       are numbered, and each chapter now has a table of its own
       contents. The whacking great table of contents at the beginning
       was moved to the end, and at the beginning there's now a
       manageable list of chapters.
     * Subdirectory Searches now explains the search order in full
       detail, with new examples.
     * The Input Filespecs section of the GREP Manual now explains how to
       search a file whose name contains a [ character.
     * The GREP Manual now explains interactions between the /L option
       and multiple regexes, and how to find a file that contains
       multiple regexes not on the same line.

Release 7.2, 13 Jan 2003

   Program changes: The latest changes from PCRE release 3.9 were adapted
   into the code for the /E2 and /E4 options. Those changes fixed some
   esoteric bugs but did not add any features. (This affects only GREP32
   since those options don't exist in GREP16, but the GREP16 release
   number was updated for consistency.)

   Documentation changes:
     * In response to a user query, the reference manual clarified that
       many options are toggles, and if used multiple times on the
       command line will reverse themselves.
     * The GREP*.HTM documents were styled to match the Oak Road Systems
       Web site. As part of this, the style sheet ORSSW.CSS has been
       replaced by the separate style sheets SCREEN.CSS and PRINT.CSS.

   Release 7.21, 12 Apr 2004, fixed a bug: when the regex contained an
   opening [ but no closing ], the command-line parser mistakenly
   diagnosed it as a bad filename instead of a bad regex.

Release 7.11, 29 Apr 2002

   This release fixed a memory allocation bug that affected the /E4
   option. For some regexes, an internal error was generated.

Release 7.1, 27 Mar 2002

   The new /E4 option tells GREP to search for your regex as a word.

   An optional second argument on the /M option now lets you define what
   is a "word" character, if you need to.

   Release 7.02, 24 Mar 2002, was an internal checkpoint release for a
   few minor changes:
     * Per user request, when you specify a list of input files with the
       /@ option leading and trailing blanks are now removed from the
       filespecs.
     * The new value 4 is returned in ERRORLEVEL if GREP found no files
       to match any of your input filespecs. A warning message also
       appears, if you specified multiple filespecs on the command line
       or used the /@ option.
     * The message "no files at all matched filespec" became "no files
       exist like filespec". This should reduce confusion with the
       (possibly normal) situation where the input file exists but none
       of its lines match the regex.
     * The warning message "Some matches in the middle of long lines may
       have been missed. You might want to try the /Wn option" now
       suggests both text and binary widths, when GREP is deciding
       whether files are text or binary (/R-1 or /R-2 option), This is
       just a clarification of the warning message; there is no change in
       how GREP handles files.
     * The reference manual says that, when an input filespec doesn't
       match any files, GREP reminds you to check your exclusions. In 7.0
       and 7.01 the warning appeared even if you never used the /X
       option; now it doesn't.

Release 7.01, 10 Feb 2002

   Program changes:
     * The warning message "the X option is useful only with named input
       files" is now "the X option is ignored when reading only standard
       input", and is suppressed when you have only stored /X options in
       the environment variable.
     * The warning message "the R option applies only to named files, not
       standard input" now appears only when you told GREP to read files
       in binary (/R2 or /R3), not when you told GREP to sense the file
       type (/R-1 or /R-2).
     * In reading text files, GREP 7.01 doesn't check for error unless
       the read function returns a non-normal status. The way it was done
       in 7.0 was correct but wasted a very few CPU cycles.

   Documentation changes:
     * In the Troubleshooting section of the user guide, "GREP is finding
       too many matches!" was changed to "How do I search for a word?"
       New question "How do I find all files that contain 'this' and
       'that'?" was added.
     * The style sheet was developed further, and validated.

Release 7.0, 21 Jan 2002

   As promised, this release was driven by users' responses to the poll
   distributed with release 6.9.

   Program changes:
     * Filenames have more extensive wildcards. The wildcard rules were
       added to the help message.
       GREP16 users, please note that ABC* now means the same thing as
       ABC*.*, namely all filenames that begin with ABC.
     * You can use the new /@ option to give GREP a file list in a file,
       when a program generates your list of input files or there are
       simply too many for the command line.
     * You can use the new /X option to exclude filenames that match
       certain patterns.
     * The /Kcount option was added, to tell GREP to stop reading each
       file after reporting the first count matches.
     * When no input files are named, and input is from the keyboard (not
       redirected from file), GREP now prompts you to enter each line.
       Previously, it just sat there and waited for you to realize your
       mistake.
     * The message prompting you for regexes (/F- option) is now written
       directly to the console, not to standard error (which could be
       redirected in some operating systems.) And a prompt appears for
       each regex after the first.
     * The text of several error and warning messages was tweaked
       slightly for consistency, and the help text was expanded a bit
       more. Customized text was removed from all "insufficient memory"
       messages, in favor of automatically generated file and line
       numbers.

   Documentation changes:
     * A complete list of GREP's warnings and error messages, with
       explanations, was added to the reference manual.
     * The description of command line syntax was overhauled. Input
       redirection was clarified, and a section was added on output
       redirection. The description of named input files was greatly
       simplified, with the detailed (and new) rules moved to the
       reference manual.
     * The HTML versions now use an experimental style sheet, which
       should make them slightly more attractive on your screen.

Release 6.9, 22 Dec 2001

   This was a pre-release of 7.0. A poll distributed with this release
   asked users to indicate which requested features they would like to
   see in the program.

   Program changes:
     * Binary file modes have been completely overhauled. The old /R
       toggle has been replaced by a mode selection via the /R2 option
       for record-oriented binary or the /R3 option for free-format
       binary. This solves a known but serious problem with the old
       binary mode, where a match would be missed if it crossed a block
       boundary.
     * The new /R-1 or /R-2 option lets you tell GREP to figure out on
       its own whether each input file is text or binary. (/R-1 and /R-2
       are available only with the registered version.)
     * You can now specify different widths for binary blocks and text
       lines with the /W option. The /W option minimum value, formerly 10
       characters, is now 2.
     * (GREP32 only) The new /M option allows correct case-blind matching
       and character classes with non-English letters and other 8-bit
       characters. (A test file is included.) Binary output now displays
       the hex value <nn> for every non-printing character, according to
       the current character set (/M option).
     * A new demo file, TOUR.BAT, is included.
     * The new /J option tells GREP to display from each line only the
       portion that matched the search string, basic regex, or extended
       regex. In release 6.0, this was added for extended regexes only,
       and you specified the /E3 option. /E3 is still allowed, but is
       equivalent to /E2 /J.
     * In record-oriented binary files (/R2 option), the ^ anchor at the
       start and $ anchor at the end of a basic regex now mean the start
       and end of block, for better consistency with extended regexes.
     * GREP is now about 5% faster on text files, and NUL (ASCII 0) will
       no longer cause the rest of a line to be ignored.
     * With the /L option, GREP now stops reading a file as soon as it
       finds a match, unless the /V option is also set.
     * Debug output now includes additional information:
          + per-file execution time and number of lines/records/buffers
            read
          + the maximum line length of any individual text file that
            exceeds the txwid in the /W option
          + total execution time, number of files scanned, and number of
            files that contained matches
          + the compiled form of extended regexes
          + blank lines and dashes at the start of debug output when
            written to a real file

     * Bug fix: Release 6.0 began diagnosing wildcard filespecs that
       produce no files at all, even when the /S (subdirectory) option is
       set. Unfortunately, the code to do that broke the previous code
       that diagnosed missing single files. The code to check the various
       cases is now collected in one place, and diagnosis should be
       correct and complete.
     * Bug fix: The numeric values of the /Q option were added to debug
       output and the help message, where they should have been for
       release 6.0.

   Documentation changes (in addition to those driven by the above
   program changes):
     * The user guide had grown more and more unwieldy. All the details
       of options and regexes are now split off into a separate reference
       manual, which is included in the download file but not published
       on the Web.
     * A table of options with one-line descriptions and a summary of
       regexes were added to the user guide; both are hyperlinked to
       sections in the reference manual. This may make it easier to find
       the feature you need.
     * Information on greedy and ungreedy quantifiers was added to the
       reference manual and to the help message.
     * The groups of options in the reference manual and the help message
       were rearranged to input, pattern-matching, output, and general.
     * The writeups of several options in the help message were expanded.

Release 6.0, 8 Sep 2001

   Note: There were beta test releases numbered 5.95, 5.97, and 5.98. For
   users who participated in the beta test, a number in parentheses
   indicates the release where a particular change was made.

   Program changes:
     * (5.95) The big news is the addition of extended regular
       expressions. GREP can now handle constructs like alternatives |,
       optionals ?, general quantifiers {...}, subexpressions (...), and
       more. With extended regexes, you can choose whether GREP reports
       matching lines as usual, or just the portion of each line that
       matches the extended regex.
     * (5.95) You can now bypass regular expressions entirely and just
       search for literal text.
     * (5.97) You can now turn the Special Rules for the Command Line on
       and off.
     * (5.98) You now have finer-grained control over warning messages
       with numeric levels for the /Q option.
     * (5.97) GREP now displays a warning message for any file spec that
       matches no files, even if the /S option (search subdirectories) is
       on.
     * (5.97) You can now put a plus sign after an option to turn it on
       (as opposed to toggling it). Example: repeated /N will flip the
       option between on and off, but /N+ turns on the option regardless
       of any previous settings.
     * (5.98) Character types and assertions were added to the help
       message.
     * (5.95) When you put a regex on the command line, you may need to
       enclose it in quotes, and if you do then GREP strips them (as past
       releases did). But, in agreement with the user guide, it no longer
       does that with regexes entered in a file or at the keyboard (/F
       option).
     * (5.95) Two bugs in parsing oddly constructed character classes
       were fixed. (1) If you had a regex like []abc], GREP wrongly took
       the first square bracket as ending the class. GREP now correctly
       treats a ] at the beginning of a character class as an ordinary
       character. (2) A minus sign at the end of a class, like [abc-], is
       now treated correctly as a normal character.
     * (5.95) The user guide told you that when your regex begins with a
       - or / character, you should prefix it with a \ to keep it from
       being taken as an option. GREP was considering that leading \ as
       part of the regex; it doesn't any more.
     * (5.98) If you specify named input files and also redirected input
       (<file), GREP has always ignored the redirected input. A warning
       message now appears in this case.
     * (5.97) The /Z option used to reset all options except /F; it now
       resets all options as documented.

   User guide changes:
     * (5.95) The section on regular expressions was pretty much
       rewritten, rather than try to shoehorn in all the stuff for
       extended regexes. (Only about 80% of the syntax of extended
       regular expressions was added to the user guide, though all is
       supported in the program. For a complete description, the relevant
       parts of the PCRE man page are also included.)
     * (5.95) A section on troubleshooting was added.
     * (5.97) The section on the environment variable now makes clear
       that the /Z option resets all options including /D and /F.
     * (5.97) The section on Special Rules for the Command Line was
       reorganized to make it clearer when you do and don't need the
       rules, and information was added on the new ability to turn them
       on and off.

Release 5.33, 19 Aug 2001

   This is a repackaging for Simtel; there are no significant functional
   changes.

Release 5.32, 20 May 2001

   If you specified current directory on another disk, such as "d:*.htm",
   GREP was taking that as root directory, "d:\*.htm". Apparently no one
   but the program author ever does such a thing!

Release 5.31, 18 April 2001

   Unfortunately, a bug was introduced in release 5.3: under certain
   circumstances, GREP got confused about whether it was working from
   standard input or input files. This release corrects that bug, with my
   apologies to everyone who downloaded the buggy 5.3.

Release 5.3, 17 April 2001

   New features:
     * The new /Y option lets you search for lines that contain multiple
       regexes in any order.
     * The /D option now allows the pseudo filename "-", for debugging
       display on standard output.
     * Options can now appear anywhere on the command line, not just
       before the first file spec.

   Other changes:
     * If the regex began with a single or double quote but did not end
       with one, GREP formerly assumed you meant to put it in quotes but
       forgot the closing quote. Now, it interprets the quote mark as the
       first character of the regex.
     * If GREP detects an internal error, it returns 128 in ERRORLEVEL
       instead of 252.
     * Two facilities for "canning" GREP parameters are now restricted to
       the registered version of the program: the environment variable
       and multiple regexes from file. (Multiple regexes can still be
       entered "live" at the keyboard.)
     * Some internal functions of the code were factored out into common
       routines used by multiple Oak Road Systems programs. There should
       be no significant change visible to users beyond the formatting of
       some messages.
     * For people who license the source code, the build procedure was
       streamlined to use a single makefile.

Release 5.2, 4 Jan 2001

     * In the user guide, split out the file input options and
       pattern-matching options from the big group of general options,
       and provide a road map to the plethora of output options.
     * In the help message, describe the /C option and /V option a bit
       more explicitly, arrange the options to match the functional
       groups in the user guide, and add a tip about using more to
       paginate the message.
     * In the list of option settings (displayed if you turn on the /D
       option), arrange the options to match the functional groups in the
       user guide, add the relevant option letter to each setting, and
       show the setting of the /1 or /0 option.
     * Replace a lot of funky macros with more straightforward functions
       for displaying diagnostic messages, and clarify the text of a few
       messages.
     * Tie certain features to the registered version of GREP. Make the
       logo and the debugging output reflect the registration status.

Release 5.1, 31 May 2000

     * fix a bug: a redundant *-expression preceding $ at the end of a
       regular expression should have matched the end of line, but did
       not. Example: ab*$ would match ab, abb, abbb, etc. at end of line;
       but it did not match an a at end of line, as it should have.

Release 5.0, 7 May 2000

   Program changes:
     * Add the /R option to read and display files in binary mode
     * Add the /W option to set the line width (formerly fixed at 255
       characters), and warn the user if longer lines were found
     * Add the /Z option to reset all options
     * Disallow out-of-order character ranges like z-a; previously they
       were silently treated like the three characters "z", "-", "a"
     * Add new return values 2 and 252-254
     * Expand the treatment of regular expressions in the help message
     * Send the help message to stdout instead of stderr as previously
     * Don't display the help screens when the user types grep with no
       options or regular expression; instead, suggest using grep /?
       |more
     * In debug mode, add more trace messages for opening input files
     * When displaying a regular expression in debug mode, use a numeric
       to show number of members in a character class
     * Fix bug in 4.5: if you used wildcards with drive but no directory,
       e.g. d:*, the drive was ignored

   User guide changes:
     * Change file name to GREPUSER.HTM from GREP.HTM.
     * Add an alphabetical index of options
     * Add note about using double quotes around filenames that contain
       spaces.

Release 4.5, 25 Sep 1999

   Program changes:
     * Fix a bug: on the command line, regular expressions like
       [\244-\246\248-\255], with adjacent escaped 8-bit character
       ranges, were not expanded correctly
     * Systematize the debugging output somewhat, in the course of fixing
       the preceding bug
     * Fix a bug: on the command line, \e in regular expressions was
       expanded to Control-W (octal 27) instead of Escape (decimal 27)

   User guide changes: Clarify and expand "Special rules for the command
   line" section of the user guide, clarify the descriptions of the /D
   and /I options, and add quite a few internal hyperlinks

Release 4.4, 18 Sep 1999 (limited release)

   Program changes:
     * Add the /S option for searching subdirectories
     * Add the /A option for searching hidden and system files

   User guide changes:
     * Add a section to describe input files and redirection

Release 4.3, 4 Aug 1999

     * Update contact information (new physical address and URL)
     * Simplify registration options
     * Add site license pricing

Release 4.2, 20 Feb 1999

     * Allow 8-bit characters in regular expressions
     * Allow multiple regular expressions to be typed in directly, with
       the /F- option
     * Fix a bug: with /I, character classes entered in lower case were
       expanded incorrectly

Release 4.1, 22 Jan 1999

     * Add the /U option (UNIX-style output) and the /Q option (quiet).
       Distinguish between option errors in the environment variable and
       on the command line
     * Make all output options toggles (except /P); diagnose conflicts
       only after the last option has been scanned
     * Take an optional output file name with /D (debug), which is no
       longer a toggle
     * Default /P (show context lines) to 2,2 if user specifies /P
       without numbers
     * Honor the special escape sequences only on the command line, since
       they're not needed when entering regular expressions in a file
     * Rewrite and greatly expand the user guide. Use HTML instead of MS
       Word for Windows

Release 4.0, May 1998

     * Add the /F option (multiple regular expressions in a file)
     * Build a 32-bit version (to accept long filenames) along with the
       16-bit version, using a single set of source files

   First shareware release: On 19 Nov 1998 the documents were updated and
   GREP was packaged for release, with no changes to the program.

Release 3.4, March 1998

     * With the /P option, remove the < > widgets around the line numbers
       of the context lines, so that the lines that actually match are
       more easily seen

Release 3.3, Feb 1998

     * Add the /L option
     * Accept options from an environment variable
     * In the output, show the file path as specified on the command
       line, not just the filename
     * Prefix program messages with "grep:" or "grep/debug:"
     * Add warning messages for incompatible or redundant sets of options
     * Diagnose a regular expression containing empty brackets [] as a
       user error, not an internal error
     * Remove the /S option (search subdirectories), because GREP's code
       now uses the C run-time library to interpret file specs on the
       command line
     * Fix a bug: inside [...] in regular expressions, the backslash was
       swallowing an extra character

Release 3.2, June 1997

     * Add the /0 and /1 options to control exit status
     * /D now shows the number of matches in each file, total matches,
       and exit status

Release 3.1, Jan 1997

     * Allow numeric escapes like \0x9A, \045, and \211 in the regular
       expression

Release 3.0, Dec 1996

     * Add the /P option (show context lines around the actual matches)
     * Display the values of all options when /D is on the command line

Release 2.4, April 1990

     * Add + in regular expressions (match one or more occurrences)
     * Allow options both before and after the regular expression
     * Add the /S option (search subdirectories)

Release 2.3, March 1990

     * Reverse the meaning of the /B option: now the default is to show
       only the names of matching files
     * Suppress "matched 0 lines" when /C (count matches) is specified
       and /B is not
     * Fix a bug: [...] character classes containing the range character
       - weren't always expanded correctly

Release 2.2, Jan 1990

     * Add the /B option (show only the names of files that contain
       matches)

Release 2.1, Dec 1989

     * Make the /D option show the input pattern as well as the decoded
       version
     * Fix a bug: character classes [...] weren't working with the /I
       option

Release 2.0, July 1989

     * Complete rewrite
     * Add the /I option (ignore case)
     * In the regular expression, add \e (escape) and \q (equal sign)

Release 1.0, April 1986

     * initial release (to clients only): Though all code was developed
       independently, I got some ideas from PC Tech Journal, May 1996,
       pages 191-199.
