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.
See https://github.com/google/re2/wiki/Syntax for the canonical
reference, but known syntactic "gotchas" relative to Python are:

* PCRE supports \Z and \z; RE2 supports \z; Python supports \z,
but calls it \Z. You must rewrite \Z to \z in pattern strings.

Known differences between this module's 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 is known to work, but has been known to fail.
For example, the system Python may not know which compiler flags
to set when building bindings for software installed by Homebrew;
see https://docs.brew.sh/Homebrew-and-Python#brewed-python-modules.
* 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.20220601.tar.gz (9.0 kB view details)

Uploaded Source

Built Distributions

google_re2-0.2.20220601-cp310-cp310-manylinux_2_24_x86_64.whl (350.0 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.24+ x86-64

google_re2-0.2.20220601-cp310-cp310-manylinux_2_24_aarch64.whl (325.2 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.24+ ARM64

google_re2-0.2.20220601-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (350.8 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

google_re2-0.2.20220601-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (329.7 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

google_re2-0.2.20220601-cp39-cp39-manylinux_2_24_x86_64.whl (350.1 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.24+ x86-64

google_re2-0.2.20220601-cp39-cp39-manylinux_2_24_aarch64.whl (325.4 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.24+ ARM64

google_re2-0.2.20220601-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (351.0 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

google_re2-0.2.20220601-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (329.9 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

google_re2-0.2.20220601-cp38-cp38-manylinux_2_24_x86_64.whl (349.9 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.24+ x86-64

google_re2-0.2.20220601-cp38-cp38-manylinux_2_24_aarch64.whl (325.0 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.24+ ARM64

google_re2-0.2.20220601-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (350.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

google_re2-0.2.20220601-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (329.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

google_re2-0.2.20220601-cp37-cp37m-manylinux_2_24_x86_64.whl (352.6 kB view details)

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

google_re2-0.2.20220601-cp37-cp37m-manylinux_2_24_aarch64.whl (326.7 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.24+ ARM64

google_re2-0.2.20220601-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (353.2 kB view details)

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

google_re2-0.2.20220601-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (332.9 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARM64

File details

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

File metadata

  • Download URL: google-re2-0.2.20220601.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for google-re2-0.2.20220601.tar.gz
Algorithm Hash digest
SHA256 cc10983dcaa0b3260a4cd1c07c7adc1fa6967dbcfacc9c1a8f11e4c118c77905
MD5 59fca028b05aee13417fe5d1aee8581b
BLAKE2b-256 f7c6b20a46f3c5261b65b29342a7a6425d98ae23e4c51a1bdd42290668daaad8

See more details on using hashes here.

File details

Details for the file google_re2-0.2.20220601-cp310-cp310-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for google_re2-0.2.20220601-cp310-cp310-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 0798c7f369f23d07913075a1a1456eeeb44dd0ce562154f7af86d07201543871
MD5 c51459f6bd4e0ac92738acb1735ef958
BLAKE2b-256 94bc3adccd18b311a2d303cce6502b9fb1b22f277bfe91b7ba68a7989eb53b2b

See more details on using hashes here.

File details

Details for the file google_re2-0.2.20220601-cp310-cp310-manylinux_2_24_aarch64.whl.

File metadata

File hashes

Hashes for google_re2-0.2.20220601-cp310-cp310-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 353959408a751a4050c6e58c0a7a0a9fa4248b0dab800c262a518b9ee1a1b814
MD5 1b1c6eb560d066ab1de835c0f98e1fd0
BLAKE2b-256 e64024a42d93b8a1af2d7de3b1496fdb557249f3c49e21438673b5e4fde78b31

See more details on using hashes here.

File details

Details for the file google_re2-0.2.20220601-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for google_re2-0.2.20220601-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 177197f1563f3c485233f7939d2607c9fd48f30cbdcbdb0ac3a8d0434b8886aa
MD5 9f167ba3aa8a6c048f47bfa7b3da942b
BLAKE2b-256 160cb51a41c6ff297b1639d8ddb6bc423b6010b69589cbae2822dfef74f449db

See more details on using hashes here.

File details

Details for the file google_re2-0.2.20220601-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for google_re2-0.2.20220601-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3c2b6915862766612bff321b42e19c1145637c494804bb25bf41e48b8374b299
MD5 3898efe6ccf1ae4e3384e166d5256c0d
BLAKE2b-256 04153893a18ad19790b9caaee225ecd4816ce5562f3da6ae8932b6dec7291b90

See more details on using hashes here.

File details

Details for the file google_re2-0.2.20220601-cp39-cp39-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for google_re2-0.2.20220601-cp39-cp39-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 1208784a9de76677936730b339d7e53781ce37872d8a7afce72e31324439a988
MD5 20c0d819964ff29be7c9b4c9478586dd
BLAKE2b-256 f98f482d59ce92fbde2944b93184b160931cb0732ccc8626e39fa7b71cd051a0

See more details on using hashes here.

File details

Details for the file google_re2-0.2.20220601-cp39-cp39-manylinux_2_24_aarch64.whl.

File metadata

File hashes

Hashes for google_re2-0.2.20220601-cp39-cp39-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 2a8272543c8cf654cce3687d03048e4f856f3336b9a69f73f0327999672676b5
MD5 90179cd3e6d6961c65ff8849f068042f
BLAKE2b-256 302ff48e9d1c223d25e89b3b089756746452df1a11774be60324515d4c90e232

See more details on using hashes here.

File details

Details for the file google_re2-0.2.20220601-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for google_re2-0.2.20220601-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 92456118e6925d6f51869561ee9c6c015995b3d5b73607a56faff1ab345c3cd2
MD5 81561789747275b9ae1118445b60c589
BLAKE2b-256 a32660cda4ff22fee2ebdfd36147715bddcb7617b94c6359d07092bb23041b85

See more details on using hashes here.

File details

Details for the file google_re2-0.2.20220601-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for google_re2-0.2.20220601-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0c49a119b2480ecfece07e99a50ebabd81a0ddbc13453371d5089b473d575cf3
MD5 cd452f890d9b71e4896566dfacaf82a0
BLAKE2b-256 8f7f7171642450d3b663d3dca6330629c38a1db4d4ed474b99a55d6b59821462

See more details on using hashes here.

File details

Details for the file google_re2-0.2.20220601-cp38-cp38-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for google_re2-0.2.20220601-cp38-cp38-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 01943c12fc86bcc2e6360ad4f11fcf47c10f6a0a254245fa8a5940e83cfd353d
MD5 35d46091e9c1d9d6e6a60f991064c851
BLAKE2b-256 1ce0277d46ce75c62a7ab1195d9f380e7f47324267c1f84d265beff563094dc2

See more details on using hashes here.

File details

Details for the file google_re2-0.2.20220601-cp38-cp38-manylinux_2_24_aarch64.whl.

File metadata

File hashes

Hashes for google_re2-0.2.20220601-cp38-cp38-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 338d47cdc3c056e4acf00fbf4ed3a792c462cfa6a6b868c59c06f52782a21501
MD5 69cebdcd5f3fcfaae8f16a3e0fc4dc29
BLAKE2b-256 3ceb25b4e36e195ff5421a2df89b31940e174130db209975405df67e86df8c1f

See more details on using hashes here.

File details

Details for the file google_re2-0.2.20220601-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for google_re2-0.2.20220601-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 574858c13d7cb56e01af9339ef2feac685ac90590976475edec36fb3a138eb09
MD5 92100e62960b36b63a2bb68c6989c9e9
BLAKE2b-256 39700d2980ff23539ca21d15907c819ce3a9afc489088c57b60d343cff3ab355

See more details on using hashes here.

File details

Details for the file google_re2-0.2.20220601-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for google_re2-0.2.20220601-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e849e389bbe5bf7dab7dd2c0c1acee36d148e7eff8d00ba38df7d0b0e49943f4
MD5 191fc07a751a15b107d7177835e7dc4c
BLAKE2b-256 83e32b3a585a7d60d126f74e2ac5d2c8ef8ee5ebd2c7cf79110b1d849fb7deff

See more details on using hashes here.

File details

Details for the file google_re2-0.2.20220601-cp37-cp37m-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for google_re2-0.2.20220601-cp37-cp37m-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 36fa536d09a83a0cc279990fb940ffbe9d5dadf4008e4887c104b72fa7dcedb0
MD5 28ebe90592c0a7de3d9640870e19d3b0
BLAKE2b-256 f788c3d415737d217d19b3e5c2e358879b99705c96fd0286e964bc10e6e9199c

See more details on using hashes here.

File details

Details for the file google_re2-0.2.20220601-cp37-cp37m-manylinux_2_24_aarch64.whl.

File metadata

File hashes

Hashes for google_re2-0.2.20220601-cp37-cp37m-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 49f0ea0182f79e0a7078e23b5fc2b138db98dc2786ab8b9ad2631ea44117ce05
MD5 07b16e3d58f4b42aa0d3044bca2e8ede
BLAKE2b-256 bc4ca5ea22047794785f9d2a31ed0a56f034fc57dcf92a3e659aa8d80588e721

See more details on using hashes here.

File details

Details for the file google_re2-0.2.20220601-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for google_re2-0.2.20220601-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a6b76d4338738d303f9bab3984fb69c7417e282e86fffe2f5d6e147b4f6654cd
MD5 2b91eb330b1d2384424870364c743ba2
BLAKE2b-256 c4082055148e928262df7ab234f4f39861c1297586a1961233c6665503fd5f2a

See more details on using hashes here.

File details

Details for the file google_re2-0.2.20220601-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for google_re2-0.2.20220601-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ef3f9b1c1b806fd45641c4ec017befeea647c5c7a6c8017440f5aed2bb7597aa
MD5 7df0ba18f2e995e7dbbb9e61f7e3e0d2
BLAKE2b-256 2111f1db39c61fbbbc2fd4165b4e0f90b61dbbfa06d8a66e45ff9824a0bbd983

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