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 Text (unicode in Python 2, str in Python 3) will be encoded to UTF-8.
* The pattern string cannot be Text 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.0.7.tar.gz (8.7 kB view details)

Uploaded Source

File details

Details for the file google-re2-0.0.7.tar.gz.

File metadata

  • Download URL: google-re2-0.0.7.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.7.7

File hashes

Hashes for google-re2-0.0.7.tar.gz
Algorithm Hash digest
SHA256 ce75309cdbec726e9b518ca79de081a9235476e56a9b2a9b2ef4fd1bab04b09c
MD5 4f195e352b6aad1474fa752cbbdfacca
BLAKE2b-256 30259a11465a5d5870c8fe86bf3858d8f2810534c3fdbccc88b5dd037457fe62

See more details on using hashes here.

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