.. contents::
pyre2 is a Python extension that wraps
Google's RE2 regular expression library <https://github.com/google/re2/>
_.
It implements many of the features of Python's built-in
re
module with compatible interfaces.
Regexp
objects have a fullmatch
method that works like match
,Regexp
objects havetest_search
, test_match
, and test_fullmatch
search
, match
, and fullmatch
,True
or False
to indicatesplit
, findall
, or finditer
.search
and match
.lastindex
or lastgroup
on Match
objects.pyre2 has only received basic testing, and I am by no means a Python extension expert, so it is quite possible that it contains bugs. I'd guess the most likely are reference leaks in error cases.
RE2 doesn't build with fPIC, so I had to build it with
::
make CFLAGS='-fPIC -c -Wall -Wno-sign-compare -O3 -g -I.'
I also had to add it to my compiler search path when building the module with a command like
::
env CPPFLAGS='-I/path/to/re2' LDFLAGS='-L/path/to/re2/obj' ./setup.py build
You can file bug reports on GitHub, or email the author: David Reiss [email protected].
See the <LICENSE>
_ file for more information.