linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Smith <sos22@cam.ac.uk>
To: "J." <mailing-lists@xs4all.nl>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: (F)using perl regex engine from C ?
Date: Thu, 13 Feb 2003 23:46:23 +0000	[thread overview]
Message-ID: <20030213234623.GA14860@cam.ac.uk> (raw)
In-Reply-To: <Pine.LNX.4.21.0302140025040.8019-100000@hestia>

[-- Attachment #1: Type: text/plain, Size: 654 bytes --]

> I was wondering if it is possible to access the perl regex engine from a
> C program. Is there a interface to it? Have people done it ? I
> guess so, but where should I start searching ?
It isn't the Perl regex engine, but libpcre (Perl Compatible Regular
Expressions) is fairly close.

Failing that, you'd probably need to either copy and paste chunks of
the Perl source code, or use libperl and run the regexps from embedded
Perl.

Of course, if you just need regular expressions, and aren't bothered
about the Perl-specific things, you could use the regex functions in
libc (regcomp, regexec, regerror, and regfree).

Steven Smith,
sos22@cam.ac.uk.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2003-02-13 23:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-31  2:40 interfacing other languages David Eduardo Gomez Noguera
2003-01-31  4:07 ` Hemant Mohan
2003-02-04 15:31 ` Reading from pipe Alexi Jordanov
2003-02-04 21:06   ` Glynn Clements
2003-02-13 23:32     ` using perl regex engine from C ? J.
2003-02-13 23:46       ` Steven Smith [this message]
2003-02-14  2:03         ` J.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030213234623.GA14860@cam.ac.uk \
    --to=sos22@cam.ac.uk \
    --cc=linux-c-programming@vger.kernel.org \
    --cc=mailing-lists@xs4all.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).