bug#40868: Grep C library for multi-string pattern matching?

2020-09-21 Thread Bruno Haible
> 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:

bug#40868: Grep C library for multi-string pattern matching?

2020-09-21 Thread Paul Eggert
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.

bug#40868: Grep C library for multi-string pattern matching?

2020-04-27 Thread Jeffrey Walton
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

bug#40868: Grep C library for multi-string pattern matching?

2020-04-27 Thread Shlomi Fish
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

bug#40868: {SPAM 04.0} bug#40868: Grep C library for multi-string pattern matching?

2020-04-26 Thread Paul Jackson
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

bug#40868: Grep C library for multi-string pattern matching?

2020-04-26 Thread Paul Jackson
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

bug#40868: Grep C library for multi-string pattern matching?

2020-04-26 Thread Paul Eggert
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.

bug#40868: Grep C library for multi-string pattern matching?

2020-04-26 Thread Jeffrey Walton
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