Skip to main content

RE2 Python bindings

Project description

A drop-in replacement for the re module.

It uses RE2 under the hood, of course, so various PCRE features
(e.g. backreferences, look-around assertions) are not supported.

Known differences between this API and the re module's API:

* The error class does not provide any error information as attributes.
* The Options class replaces the re module's flags with RE2's options as
gettable/settable properties. Please see re2.h for their documentation.
* The pattern string and the input string do not have to be the same type.
Any str will be encoded to UTF-8.
* The pattern string cannot be str if the options specify Latin-1 encoding.

Known issues with regard to building the C++ extension:

* Building requires RE2 to be installed on your system.
On Debian, for example, install the libre2-dev package.
* Building requires pybind11 to be installed on your system OR venv.
On Debian, for example, install the pybind11-dev package.
For a venv, install the pybind11 package from PyPI.
* Building on macOS has not been tested yet and will possibly fail.
* Building on Windows has not been tested yet and will probably fail.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

google-re2-0.2.20210601.tar.gz (8.7 kB view hashes)

Uploaded Source

Built Distributions

google_re2-0.2.20210601-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (334.3 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

google_re2-0.2.20210601-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (334.3 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

google_re2-0.2.20210601-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (336.6 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

google_re2-0.2.20210601-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (336.5 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page