GNU bug report logs - #40868
Grep C library for multi-string pattern matching?

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: grep; Reported by: noloader@HIDDEN; dated Sun, 26 Apr 2020 13:59:01 UTC; Maintainer for grep is bug-grep@HIDDEN.

Message received at 40868 <at> debbugs.gnu.org:


Received: (at 40868) by debbugs.gnu.org; 27 Apr 2020 15:13:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 27 11:13:28 2020
Received: from localhost ([127.0.0.1]:37890 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jT5Ro-00032e-7f
	for submit <at> debbugs.gnu.org; Mon, 27 Apr 2020 11:13:28 -0400
Received: from mail-il1-f193.google.com ([209.85.166.193]:42181)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <noloader@HIDDEN>) id 1jT5Rm-00032O-DB
 for 40868 <at> debbugs.gnu.org; Mon, 27 Apr 2020 11:13:26 -0400
Received: by mail-il1-f193.google.com with SMTP id t12so16997153ile.9
 for <40868 <at> debbugs.gnu.org>; Mon, 27 Apr 2020 08:13:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:reply-to:from:date:message-id
 :subject:to:content-transfer-encoding;
 bh=je3USFiKhUzMKTJs3BjdqNPeE77L5bVkc/4eejGNKcE=;
 b=lVXctkTyKzehif0jOsSeP0boRvq8piB9vCR56atvaPgiojtDPoeD7RUCLp2gtdaU3f
 kEp8Lqrb/RpNVcrBK5vwW79HhO0lY9fue4AS+WWVVEM595PyqUy3nnzM50dx6FF/eleC
 bBg4OPOJXyqapP5jSW1iD3oZRjIe/Uyt+eAWxOql5M8SLfS8VEFkoc8VXFzsIvERMxTe
 QlNifEjQbFrSeJLWVBJvC7MEfPl2U2COqMIitZu3F1vr1BXEf3HmE8ZFAmshF9dRM+7E
 2+CXM+87wHQ2tzMS2pwvgH/YU+zigwukC4GQvkCzVWHzdU8EcMqm+qYSIgzU9FeJyyGr
 3AlA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:reply-to
 :from:date:message-id:subject:to:content-transfer-encoding;
 bh=je3USFiKhUzMKTJs3BjdqNPeE77L5bVkc/4eejGNKcE=;
 b=VaFaR2lYuLc14d59fAlD1MLqijx+fGvm6EMHWd2ev9/KWaajqHlaKdRFoqRPpthgpm
 o3G5M/DEeygOZTwrzekqSayhMmCfpIKOhFs4VGus8fcH5EEbiw2mgxxWLvcB2o2ALD+j
 Sn3sJW/p2RnPNTELtjQS8fyMYvRqQzGb894a+LXdrMhyxnvXSXIhR4h3RZdhMenOqdEP
 ihq9dZHd5eyBDlSykO8pFWGoze8N8sspNS6JJrgh8WcMQ66QmpIJoZDoQ64IB5bJHAQh
 sBP9Xcfv4nXtLrKOHX5V9nJaQFpsxGeL1R4p1JgxWxIXskOiNXboKj5WLOxBMfhHeIhD
 bpow==
X-Gm-Message-State: AGi0Pua0OFk/vo7x0awzw8T10rXHbSu0mRDdDPQLzX67Uy1N44GC//L/
 l1NSdnuhBSmrkGJ7kuClmBw2SZ1xDfxp9XYwZKEI9g==
X-Google-Smtp-Source: APiQypJSwb5gKiqQSpfVrMkR8v0+o+tI0ACXbx4EtIUBOL5wxpxjWrv2UTV/LeoZmMdmt7P8JT4RHY/kiuwAh58nby0=
X-Received: by 2002:a92:7a07:: with SMTP id v7mr22069600ilc.238.1588000400481; 
 Mon, 27 Apr 2020 08:13:20 -0700 (PDT)
MIME-Version: 1.0
References: <CAH8yC8=NUocNBudJxbg+yczwR3_zbUHPKBE_SAzcQUzHqMgDGw@HIDDEN>
In-Reply-To: <CAH8yC8=NUocNBudJxbg+yczwR3_zbUHPKBE_SAzcQUzHqMgDGw@HIDDEN>
From: Jeffrey Walton <noloader@HIDDEN>
Date: Mon, 27 Apr 2020 11:12:53 -0400
Message-ID: <CAH8yC8kCuK2ZB8VTp4A--MFRHmTzViM9R4tuJRJrTR5oGuf29w@HIDDEN>
Subject: Re: bug#40868: Grep C library for multi-string pattern matching?
To: 40868 <at> debbugs.gnu.org
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40868
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: noloader@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sun, Apr 26, 2020 at 9:59 AM Jeffrey Walton <noloader@HIDDEN> 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=E2=80=93Corasick or Commentz-Walter (or similar).
>
> Does Grep provide a library that exposes its multi-string pattern
> matching? If not, can someone recommend an implementation?

Thanks everyone.




Information forwarded to bug-grep@HIDDEN:
bug#40868; Package grep. Full text available.

Message received at 40868 <at> debbugs.gnu.org:


Received: (at 40868) by debbugs.gnu.org; 27 Apr 2020 06:53:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 27 02:53:09 2020
Received: from localhost ([127.0.0.1]:35418 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jSxdY-00043C-Ly
	for submit <at> debbugs.gnu.org; Mon, 27 Apr 2020 02:53:09 -0400
Received: from gateway36.websitewelcome.com ([192.185.186.5]:27203)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <shlomif@HIDDEN>) id 1jSxdV-00042k-PM
 for 40868 <at> debbugs.gnu.org; Mon, 27 Apr 2020 02:53:02 -0400
Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19])
 by gateway36.websitewelcome.com (Postfix) with ESMTP id 19DA4407135E4
 for <40868 <at> debbugs.gnu.org>; Mon, 27 Apr 2020 01:11:09 -0500 (CDT)
Received: from gator4065.hostgator.com ([192.185.4.76]) by cmsmtp with SMTP
 id SxdRjHUT98vkBSxdRj1Vsc; Mon, 27 Apr 2020 01:52:57 -0500
X-Authority-Reason: nr=8
Received: from igld-84-229-96-191.inter.net.il ([84.229.96.191]:38278
 helo=telaviv1.shlomifish.org) by gator4065.hostgator.com with esmtpsa
 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92)
 (envelope-from <shlomif@HIDDEN>)
 id 1jSxdQ-002IxJ-O0; Mon, 27 Apr 2020 01:52:56 -0500
Received: from telaviv1.shlomifish.org (telaviv1.shlomifish.org [127.0.0.1])
 by telaviv1.shlomifish.org (Postfix) with ESMTP id C7B0C2610F3;
 Mon, 27 Apr 2020 09:52:53 +0300 (IDT)
Date: Mon, 27 Apr 2020 09:52:53 +0300
From: Shlomi Fish <shlomif@HIDDEN>
To: Jeffrey Walton <noloader@HIDDEN>
Subject: Re: bug#40868: Grep C library for multi-string pattern matching?
Message-ID: <20200427095253.61402b2b@HIDDEN>
In-Reply-To: <CAH8yC8=NUocNBudJxbg+yczwR3_zbUHPKBE_SAzcQUzHqMgDGw@HIDDEN>
References: <CAH8yC8=NUocNBudJxbg+yczwR3_zbUHPKBE_SAzcQUzHqMgDGw@HIDDEN>
X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-mageia-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - gator4065.hostgator.com
X-AntiAbuse: Original Domain - debbugs.gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - shlomifish.org
X-BWhitelist: no
X-Source-IP: 84.229.96.191
X-Source-L: No
X-Exim-ID: 1jSxdQ-002IxJ-O0
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-Source-Sender: igld-84-229-96-191.inter.net.il (telaviv1.shlomifish.org)
 [84.229.96.191]:38278
X-Source-Auth: shlomif@HIDDEN
X-Email-Count: 2
X-Source-Cap: c2hsb21pZjtzaGxvbWlmO2dhdG9yNDA2NS5ob3N0Z2F0b3IuY29t
X-Local-Domain: yes
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: 40868
Cc: 40868 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)

Hi Mr. Walton!

On Sun, 26 Apr 2020 09:58:10 -0400
Jeffrey Walton <noloader@HIDDEN> wrote:

> Hi Everyone,
>=20
> 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=E2=80=93Corasick or Commentz-Walter (or similar).
>=20
> Does Grep provide a library that exposes its multi-string pattern
> matching? If not, can someone recommend an implementation?
>=20

There is an impl of Aho-Corasik in C++ here:
https://www.geeksforgeeks.org/aho-corasick-algorithm-pattern-searching/ (un=
der
CC-by-sa).

Furthermore, you may wish to look at FOSS grep-like tools:

* https://wiki.freebsd.org/BSDgrep

* https://github.com/ggreer/the_silver_searcher

* https://beyondgrep.com/more-tools/

> Thanks in advance.
>=20
>=20
>=20



--=20

Shlomi Fish       https://www.shlomifish.org/
Let=E2=80=99s talk about restores instead of backups - https://is.gd/WatQqu

=E2=80=9CStop reinventing wheels, start building space rockets.=E2=80=9D
    =E2=80=94 The motto of the Comprehensive Perl Archive Network

Please reply to list if it's a mailing list post - https://shlom.in/reply .




Information forwarded to bug-grep@HIDDEN:
bug#40868; Package grep. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 27 Apr 2020 01:08:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 26 21:08:46 2020
Received: from localhost ([127.0.0.1]:35253 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jSsGM-0006Eu-Ks
	for submit <at> debbugs.gnu.org; Sun, 26 Apr 2020 21:08:46 -0400
Received: from lists.gnu.org ([209.51.188.17]:53057)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pj@HIDDEN>) id 1jSsGK-0006El-Tt
 for submit <at> debbugs.gnu.org; Sun, 26 Apr 2020 21:08:45 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54330)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <pj@HIDDEN>) id 1jSsGK-00017c-H6
 for bug-grep@HIDDEN; Sun, 26 Apr 2020 21:08:44 -0400
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,
 DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,
 SPF_HELO_PASS,SPF_NEUTRAL,URIBL_BLOCKED autolearn=unavailable
 autolearn_force=no version=3.4.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1)
 (envelope-from <pj@HIDDEN>) id 1jSsGJ-0007EP-S4
 for bug-grep@HIDDEN; Sun, 26 Apr 2020 21:08:44 -0400
Received: from forward2-smtp.messagingengine.com ([66.111.4.226]:47341)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <pj@HIDDEN>) id 1jSsGJ-0007Aq-DD
 for bug-grep@HIDDEN; Sun, 26 Apr 2020 21:08:43 -0400
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailforward.nyi.internal (Postfix) with ESMTP id 612B519405CD
 for <bug-grep@HIDDEN>; Sun, 26 Apr 2020 21:08:42 -0400 (EDT)
Received: from imap21 ([10.202.2.71])
 by compute1.internal (MEProxy); Sun, 26 Apr 2020 21:08:42 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=fPRUuv
 NYqPJtqYyeurKrj7RLA62jpnR7v8RewNzBIaA=; b=OGhVs0WPcCxsTC+eXbs6tq
 jxtKtN9eTKoiLcqIXq5kpNrt/KWRACnz0SHm+K7lkgwakAOKPc4abB/rIjew9MFn
 UHLsg5mG6JuClvsXNyb4osAl9NjwRPuWTREQzjgkpOztTCw47zhjqWV2RWfNPcDQ
 9SYF0/JETwypnp2A+Rm8i7qkekSXzEjqnBAHi9uJx0bM1pmNfkMmBS9KMF47scsC
 nYRXZ6Mm7OVCvdCQ4edsgxo+R4ntk2m8IyftSAo4CloAw12OniDdRu+oq2r4Lb5S
 p2I6NnW8UgChaBmzkTxiAlnjxMlN3BmbOUY/IOhze3j8qQokU1VL2mTBQpEGltLQ
 ==
X-ME-Sender: <xms:mTCmXvrgcR3AKJ8meNsRHzyDIYyH-ZX4MHra4caRoVHksOHEYFKLWg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrheekgdegfecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgesthdtre
 dtreerjeenucfhrhhomhepfdfrrghulhculfgrtghkshhonhdfuceophhjsehushgrrdhn
 vghtqeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe
 hpjhesuhhsrgdrnhgvth
X-ME-Proxy: <xmx:mTCmXlfRRsndATnPQ9veuEm1DWWAZJUTkNH353s21al5iYNSdFVMnw>
 <xmx:mTCmXnmFwIkkryl8u9ulX7oIMr05nAhQyq_KuSz4eN5eew22540fYQ>
 <xmx:mTCmXsbHHctOAtjhsejVZc-xySegIhF3AC2t3UugebZT9jq53TPaag>
 <xmx:mjCmXhEjoewgt9bavvp8pdQE1XyNuu-diOJSrKY5LL3qkYxpVTjFEQ>
Received: by mailuser.nyi.internal (Postfix, from userid 501)
 id BF466660089; Sun, 26 Apr 2020 21:08:41 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.3.0-dev0-351-g9981f4f-fmstable-20200421v1
Mime-Version: 1.0
Message-Id: <7c9339f8-b07a-4df5-9152-83d9628a2173@HIDDEN>
In-Reply-To: <b1a942d2-9f8c-4b48-8e06-a53fb930d558@HIDDEN>
References: <CAH8yC8=NUocNBudJxbg+yczwR3_zbUHPKBE_SAzcQUzHqMgDGw@HIDDEN>
 <b1a942d2-9f8c-4b48-8e06-a53fb930d558@HIDDEN>
Date: Sun, 26 Apr 2020 20:08:21 -0500
From: "Paul Jackson" <pj@HIDDEN>
To: bug-grep@HIDDEN
Subject: =?UTF-8?Q?Re:_{SPAM_04.0}_bug#40868:_Grep_C_library_for_multi-string_pat?=
 =?UTF-8?Q?tern_matching=3F?=
Content-Type: text/plain
Received-SPF: neutral client-ip=66.111.4.226; envelope-from=pj@HIDDEN;
 helo=forward2-smtp.messagingengine.com
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/26 20:08:27
X-ACL-Warn: Detected OS   = Linux 2.2.x-3.x [generic] [fuzzy]
X-Received-From: 66.111.4.226
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

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
                pj@HIDDEN




Information forwarded to bug-grep@HIDDEN:
bug#40868; Package grep. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 26 Apr 2020 23:54:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 26 19:54:06 2020
Received: from localhost ([127.0.0.1]:35195 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jSr66-0004T6-5A
	for submit <at> debbugs.gnu.org; Sun, 26 Apr 2020 19:54:06 -0400
Received: from lists.gnu.org ([209.51.188.17]:46004)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pj@HIDDEN>) id 1jSr64-0004Sz-Gz
 for submit <at> debbugs.gnu.org; Sun, 26 Apr 2020 19:54:04 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:48532)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <pj@HIDDEN>) id 1jSr5t-00087z-Lw
 for bug-grep@HIDDEN; Sun, 26 Apr 2020 19:54:04 -0400
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,
 DKIM_VALID,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_NEUTRAL,URIBL_BLOCKED
 autolearn=unavailable autolearn_force=no version=3.4.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1)
 (envelope-from <pj@HIDDEN>) id 1jSr5s-00069X-Qu
 for bug-grep@HIDDEN; Sun, 26 Apr 2020 19:53:53 -0400
Received: from wforward4-smtp.messagingengine.com ([64.147.123.34]:45777)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <pj@HIDDEN>) id 1jSr5s-00067I-8c
 for bug-grep@HIDDEN; Sun, 26 Apr 2020 19:53:52 -0400
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailforward.west.internal (Postfix) with ESMTP id 76CDA481
 for <bug-grep@HIDDEN>; Sun, 26 Apr 2020 19:53:48 -0400 (EDT)
Received: from imap21 ([10.202.2.71])
 by compute1.internal (MEProxy); Sun, 26 Apr 2020 19:53:48 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=Rba83g
 I5N+jisDZLMiGqa8O5hUOVCQmBOy9ZuT2M8Ng=; b=N+z4ATPFcoW4C4birN9NRe
 9Wyvbb8Oan8xfF9oA8g8umCvaBLTpgzcRnOYA0JP3V8t2djylqvhkWB7BFLH+lnM
 9VITAqWF1Wl+TyNyCqAw764x1FNYiFp+ONvUUOtNO6kOBQscVV1tiABI46mpW55u
 bZ3DgmxZezDhh9OC+5aO2OoVHTUJo1VkZm72IcFG0NVH0vwCvQ5jWmjS0urlxlHG
 KZqkpwBrl9Plwmr8Oz9KGAB2sgGvwqmniNeA+Fpi9crtihIIlQcmTlQaQOs869nw
 gvRWs2OROajczTOqRTvF6IJKEAeL+WPFOgPYYb29H94bNA/argK/RrgYXRmAVaYg
 ==
X-ME-Sender: <xms:Cx-mXnIzBKp57UUJek-UEQ1b_Bu42WQzyzKUGwUTTNWZPsskDf8tTw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrheekgddvjecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgesthdtre
 dtreertdenucfhrhhomhepfdfrrghulhculfgrtghkshhonhdfuceophhjsehushgrrdhn
 vghtqeenucffohhmrghinhepnhhonhhgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivg
 eptdenucfrrghrrghmpehmrghilhhfrhhomhepphhjsehushgrrdhnvght
X-ME-Proxy: <xmx:Cx-mXgRqvvwlyN8yxnGeos2s-FLYUq0xSMJI9vcV3PdnRoUD3b9EJw>
 <xmx:Cx-mXm_FszOYG2wJvcq4oY_vKq53UXoFbkz4eIjrIEtNqg7VxCjCZw>
 <xmx:Cx-mXn-r7siF9ZrsttGIk4h1F21Ut2wWivwmTatMHpBYDyLtgMlFNg>
 <xmx:DB-mXh-oRkNshiE3iGSQDwspYIDMvNUd39VIazelP7iWSoKPD5O3ZRJ9kJQ>
Received: by mailuser.nyi.internal (Postfix, from userid 501)
 id 9302A660082; Sun, 26 Apr 2020 19:53:47 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.3.0-dev0-351-g9981f4f-fmstable-20200421v1
Mime-Version: 1.0
Message-Id: <b1a942d2-9f8c-4b48-8e06-a53fb930d558@HIDDEN>
In-Reply-To: <CAH8yC8=NUocNBudJxbg+yczwR3_zbUHPKBE_SAzcQUzHqMgDGw@HIDDEN>
References: <CAH8yC8=NUocNBudJxbg+yczwR3_zbUHPKBE_SAzcQUzHqMgDGw@HIDDEN>
Date: Sun, 26 Apr 2020 18:53:26 -0500
From: "Paul Jackson" <pj@HIDDEN>
To: bug-grep@HIDDEN
Subject: Re: bug#40868: Grep C library for multi-string pattern matching?
Content-Type: text/plain
Received-SPF: neutral client-ip=64.147.123.34; envelope-from=pj@HIDDEN;
 helo=wforward4-smtp.messagingengine.com
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/26 19:53:48
X-ACL-Warn: Detected OS   = Linux 2.2.x-3.x [generic] [fuzzy]
X-Received-From: 64.147.123.34
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

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 Watson's libpipeline:

  http://libpipeline.nongnu.org

-- 
                Paul Jackson
                pj@HIDDEN




Information forwarded to bug-grep@HIDDEN:
bug#40868; Package grep. Full text available.

Message received at 40868 <at> debbugs.gnu.org:


Received: (at 40868) by debbugs.gnu.org; 26 Apr 2020 19:19:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 26 15:19:48 2020
Received: from localhost ([127.0.0.1]:34965 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jSmoe-0003Hr-L5
	for submit <at> debbugs.gnu.org; Sun, 26 Apr 2020 15:19:48 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:33766)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1jSmod-0003HT-Gt
 for 40868 <at> debbugs.gnu.org; Sun, 26 Apr 2020 15:19:47 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id F327B16008D;
 Sun, 26 Apr 2020 12:19:41 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id 3pCPSRXksshi; Sun, 26 Apr 2020 12:19:41 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 55B961600D1;
 Sun, 26 Apr 2020 12:19:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id qsYqowifqfND; Sun, 26 Apr 2020 12:19:41 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 2CA7E16008D;
 Sun, 26 Apr 2020 12:19:41 -0700 (PDT)
Subject: Re: bug#40868: Grep C library for multi-string pattern matching?
To: noloader@HIDDEN
References: <CAH8yC8=NUocNBudJxbg+yczwR3_zbUHPKBE_SAzcQUzHqMgDGw@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Autocrypt: addr=eggert@HIDDEN; prefer-encrypt=mutual; keydata=
 LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB
 QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk
 R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0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XdXb3U2anFVRFRTRHZuOVloTlRkRzBLWFBN
 NzRhQyt4cjJab3cxTzJtaFhpaGdXS0QKMER3KzBMWVBuVU9zUTBLT0Z4SFhYWUhtUnJTMU9a
 UFU1OUJMdmMrVFJoSWhhZlNIS0x3YlhLKzZja2t4Qng2aAo4ejVjY3BHMFFzNGJGaGRGWW5G
 ckVpZURMb0dtbkUyWUxoZFY2c3dKOVZOQ1M2cExpRW9oVDNmbTdhWG0xNXRaCk9JeXpNWmhI
 UlNBUGJsWHhRMFpTV2pxOG9ScmNZTkZ4YzRXMVVScEFrQkNPWUpvWHZRZkQ1TDNscUFsOFRD
 cUQKVXpZeGhIL3RKaGJEZEhycUhINzY3amFEYVRCMStUYWxwLzJBTUt3Y1hOT2Rpa2xHeGJt
 SFZHNllHbDZnOExyYgpzdTlOWkVJNHlMbEh6dWlrdGhKV2d6KzN2WmhWR3lObHQrSE5Jb0Y2
 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx
 NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2
 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh
 N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO
 N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP
 Q0stLS0tLQo=
Organization: UCLA Computer Science Department
Message-ID: <b57b725b-2abd-58f9-52ac-3df5bce0605b@HIDDEN>
Date: Sun, 26 Apr 2020 12:19:40 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.7.0
MIME-Version: 1.0
In-Reply-To: <CAH8yC8=NUocNBudJxbg+yczwR3_zbUHPKBE_SAzcQUzHqMgDGw@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 40868
Cc: 40868 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

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.




Information forwarded to bug-grep@HIDDEN:
bug#40868; Package grep. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 26 Apr 2020 13:58:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 26 09:58:40 2020
Received: from localhost ([127.0.0.1]:33830 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jShns-0005sP-Aq
	for submit <at> debbugs.gnu.org; Sun, 26 Apr 2020 09:58:40 -0400
Received: from lists.gnu.org ([209.51.188.17]:47903)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <noloader@HIDDEN>) id 1jShnr-0005sI-2q
 for submit <at> debbugs.gnu.org; Sun, 26 Apr 2020 09:58:39 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:52748)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <noloader@HIDDEN>) id 1jShnq-0000NJ-F7
 for bug-grep@HIDDEN; Sun, 26 Apr 2020 09:58:38 -0400
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,
 RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=unavailable autolearn_force=no
 version=3.4.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1)
 (envelope-from <noloader@HIDDEN>) id 1jShnp-0003t1-8H
 for bug-grep@HIDDEN; Sun, 26 Apr 2020 09:58:38 -0400
Received: from mail-io1-xd44.google.com ([2607:f8b0:4864:20::d44]:46387)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <noloader@HIDDEN>)
 id 1jShno-0003ns-Sd
 for bug-grep@HIDDEN; Sun, 26 Apr 2020 09:58:36 -0400
Received: by mail-io1-xd44.google.com with SMTP id i3so15928343ioo.13
 for <bug-grep@HIDDEN>; Sun, 26 Apr 2020 06:58:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:reply-to:from:date:message-id:subject:to
 :content-transfer-encoding;
 bh=3SEIM8fcpvHUkMUz5QPUkOsKEDF8yKdw8xyluZMGLy4=;
 b=UbIB9NYvoNW6aAMP470lHdcMO3jHSP75IpPQA5OIEytjuotrwI55g/icdPSCRW3Cud
 wBQLFI1rY5PhBBM9z8g9kjlfzYyezpHGyWuXWfF2uIM9dL0rPXn4bRXSkJJOEcwWPfFd
 I939cVmfaIrX38HsyhH9lnippgZsEg1oleikqdvLa4eNk0ztomcOXtn1G6QPWxWgiLoY
 K3H5VOu0arizqvorZKkR7dMPuPpWitKCgfv7FqQKywwvbaFu/x1o+Y36ywVakx/Khpfc
 G2w0bDed4b1dJLYvjQn7aGVaoZsejeFTLazSv/fxX1ZhomshoqfnKUhCtyhNEwX3ifst
 S1ag==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:reply-to:from:date:message-id
 :subject:to:content-transfer-encoding;
 bh=3SEIM8fcpvHUkMUz5QPUkOsKEDF8yKdw8xyluZMGLy4=;
 b=cD5LYgtq2+YSB0vd+/wFBYLb0Z3XJowgfKW6AeUZgUJdJnBzOLNpsVDzIQpqO1tLAY
 Q3R0GoLiDpgfe/FQ7BLWtfZDuPk0fhEpdnxqCFWP6pKeMhM+xzGIHb/Ai4w6wcsktypQ
 OU6AjuJi6wLf1qblLqBXdXOOYfZ9sBEeElysrPp5SfZIaxQatQNE44kxLhdP5crrSQZW
 ehH22UXtlodXsCh1nJ/UYKFPRJRbH64M+V2w1UJ/TpmKNEQ9iO5WvT7EjkuCHJMrL8uL
 zwlM8YVVk6UU6MU/LxaDfAuHywyIAxr+tBvxzIsxOIVGqCZxPTdm5X/FF9QcdFBKcRtp
 YwMg==
X-Gm-Message-State: AGi0PuaUQXAtdMXSvQKe9GrrXGrw0GzCUvsYw2lKwmTfUShcpexgaH0G
 BeKnpVUQeNbcGs0um/wRbjWtwYFrYqdXJUbQ7dzL2nfE
X-Google-Smtp-Source: APiQypLhWQCG/OXV6kt95b3MfqscmAvP/wvoOeweQovHSXV883hB+FT58KplCsquizqspns+6kekprlqj2mNgNacFpo=
X-Received: by 2002:a02:8785:: with SMTP id t5mr15989916jai.15.1587909514718; 
 Sun, 26 Apr 2020 06:58:34 -0700 (PDT)
MIME-Version: 1.0
From: Jeffrey Walton <noloader@HIDDEN>
Date: Sun, 26 Apr 2020 09:58:10 -0400
Message-ID: <CAH8yC8=NUocNBudJxbg+yczwR3_zbUHPKBE_SAzcQUzHqMgDGw@HIDDEN>
Subject: Grep C library for multi-string pattern matching?
To: bug-grep@HIDDEN
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=2607:f8b0:4864:20::d44;
 envelope-from=noloader@HIDDEN; helo=mail-io1-xd44.google.com
X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT :
 Malformed IPv6 address (bad octet value).
 Location : parse_addr6(), p0f-client.c:67
X-Received-From: 2607:f8b0:4864:20::d44
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: noloader@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

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=E2=80=93Corasick or Commentz-Walter (or similar).

Does Grep provide a library that exposes its multi-string pattern
matching? If not, can someone recommend an implementation?

Thanks in advance.




Acknowledgement sent to noloader@HIDDEN:
New bug report received and forwarded. Copy sent to bug-grep@HIDDEN. Full text available.
Report forwarded to bug-grep@HIDDEN:
bug#40868; Package grep. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 27 Apr 2020 15:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.