LablPCRE provides simple and easy to use access to regular expression
matching, offering a rich module-based interface based on PCRE's POSIX
This release has been built and tested using OCaml 3.09.3 on Fedora
Core 6 and Windows XP, supports findlib and "hands-off" building and
installing (no "configure" script or manual file editing required),
and has pre-built binaries for [native] Windows XP. The full package
is licensed under the "new" BSD license, and may be downloaded here:
Caml-list mailing list. Subscription management:
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
Can you (or anyone familiar with both) summarize how this binding
compares to Markus Mottl's pcre-ocaml? Thanks.
Eric Cooper e c c @ c m u . e d u
I don't know much about it, but it seems to implement the API for
POSIX-style regular expressions whereas pcre-ocaml implements Perl
compatibility regular expressions. There are obviously no functions for
string substitution, etc., in LablPCRE (yet).
Markus Mottl http://www.ocaml.info markus...@gmail.com
As Markus says, it does implement the POSIX API for regular expression
matching and extraction of sub-patterns... but note that that just
[here] controls the "level" of the interface: there is a regcomp
function for compiling the patterns and a regexec call for matching a
compiled pattern against a specific string.
The full "language" of PCRE for matching and pattern specification is
accepted. Further, LablPCRE adds an even lighter-weight regmatch
function when all that is desired is a boolean answer on a match, as
well as a set of substring extraction and [error] status info accessor
LablPCRE makes an effort to be a good GC-citizen by not holding
references to anything it doesn't need to. :)
Finally, LablPCRE supports PCRE 7.0 (or any of the releases back to 6.1).