|Binary Regular Expression Matching (bregexp) email@example.com (1995-03-20)|
|Re: Binary Regular Expression Matching (bregexp) firstname.lastname@example.org (1995-03-22)|
|From:||email@example.com (Henry Spencer)|
|Organization:||U of Toronto Zoology|
|Date:||Wed, 22 Mar 1995 19:00:42 GMT|
firstname.lastname@example.org (Stefan Krabbe) writes:
>Question: Do you know if there exists a regexp-function that works
> on binary files, preferably written in C, that I can
> grab? I'm looking for something almost like the library
> function regexp(3) from 4.3 BSD, or the regcomp(3C)
> from HPUX.
The POSIX.2 regex(3) package I wrote for 4.4BSD can do this, if you use
some of its kludgey extensions. (The kludgey extensions are needed to
specify the ends of the pattern and the string without making NUL a
special character; otherwise it doesn't depend on either being text.)
It's kind of slow -- I'm working on a better one -- but it does work.
>2-I'd like to be able to specify my own whitespace.
> That way I can make it a normal text-regexp if I set whitespace to newline.
Most regular-expression packages have no notion of "whitespace"; if you
want to examine your input a piece at a time, you hand it to the package
a piece at a time.
| Henry Spencer
Return to the
Search the comp.compilers archives again.