in reply to regular expression searching in binary files

This is not really answering your question (especially since you're on Windows), but do you know the Unix command ident does exactly what you're after?

IDENT(1) -- 1993/11/09 -- GNU NAME ident - identify RCS keyword strings in files SYNOPSIS ident [ -q ] [ -V ] [ file ... ] DESCRIPTION ident searches for all instances of the pattern $keyword: text $ in the named files or, if no files are named, the standard input.
Certainly I have used ident successfully on binary files under Cygwin on Windows.

Replies are listed 'Best First'.
Re^2: regular expression searching in binary files
by dhlocker (Novice) on Nov 13, 2006 at 02:32 UTC
    Ident is exactly what I am trying to emulate on this "platform." Unfortunately, ident doesn't seem to find these double-octet encoded strings as I thought it would, so I turned to Perl. ident does work fine on the source code, of course. (I use a _lot_ of cygwin to get me through the day in this Micros**t shop.) Maybe I did something wrong, though with ident that's hard to do :)

    Thanks for the thought; I'll try again.

    Donald.