> Does Grep provide a library that exposes its multi-string pattern
> matching? If not, can someone recommend an implementation?
I don't know exactly what you mean, but the GNU grep algorithms are
used as a library in GNU gettext:
Discussion on this old grep bug report has died down (and it wasn't a grep bug
anyway) so I'm closing the bug report.
On Sun, Apr 26, 2020 at 9:59 AM Jeffrey Walton wrote:
>
> I need to perform multi-string pattern matching in C. The problem I am
> working on does not allow a shell script. I'm looking for a library
> that implements Aho–Corasick or Commentz-Walter (or similar).
>
> Does Grep provide a library
Hi Mr. Walton!
On Sun, 26 Apr 2020 09:58:10 -0400
Jeffrey Walton wrote:
> Hi Everyone,
>
> I need to perform multi-string pattern matching in C. The problem I am
> working on does not allow a shell script. I'm looking for a library
> that implements Aho–Corasick or Commentz-Walter (or
P.S. -- on multi-core systems (which most are these days),
piping data between executables working in parallel can
be a good way to reduce the elapsed clock time of a job,
albeit at the expense of higher system CPU utilization.
--
Paul Jackson
p...@usa.net
Perhaps you could use fork, exec, pipe, read, write, and similar system calls,
to execute grep and feed data through it, without resorting to any shell or
any shell wrapper such as the system(3) library call.
Or, if that would work, except for being rather fussy to code,
then consider Colin
On 4/26/20 6:58 AM, Jeffrey Walton wrote:
> Does Grep provide a library that exposes its multi-string pattern
> matching?
No, and that's partly by design: Grep is GPLed rather than LGPLed. I don't know
of any free library that does anything similar.
Hi Everyone,
I need to perform multi-string pattern matching in C. The problem I am
working on does not allow a shell script. I'm looking for a library
that implements Aho–Corasick or Commentz-Walter (or similar).
Does Grep provide a library that exposes its multi-string pattern
matching? If