$npx skillfedfor your agent

google-re2

RE2 Python bindings

With conditionsPyPI Text ProcessingReleased Nov 202516.1M downloads / mopermissive licensePlatform wheel

Decision gist · record as of 2026-08-14

platform wheels — google_re2-1.1.20251105-1-cp310-cp310-macosx_13_0_arm64.whl · google_re2-1.1.20251105-1-cp310-cp310-macosx_13_0_x86_64.whl · google_re2-1.1.20251105-1-cp310-cp310-macosx_14_0_arm64.whl
v1.1.20251105 · released 2025-11-05 · Python ~=3.9

Yes, if you need predictable regex performance and can accept RE2's syntax limitations. The permissive license and active repository are favorable. Medium install friction (system libraries required) and aging maintenance status (282 days since release) are minor concerns; the underlying RE2 engine is mature and the package has no known vulnerabilities. Not suitable if your patterns rely on backreferences, lookarounds, or other PCRE-only features.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires RE2 library and pybind11 to be installed on your system before installation; precompiled wheels available for Python 3.9+ on common platforms.
  • Medium install friction: precompiled wheels are available for current Python versions on macOS, Linux, and Windows, but building from source requires RE2 and pybind11 system libraries.
  • The package is aging (282 days since last release) but the underlying repository remains active.

License · maintenance · safety

permissive license (permissive) — Permissive license (BSD) means you can use, modify, and distribute this package with minimal restrictions, though you should include the license notice in distributions.

last release 2025-11-05 (282 days) · last repo commit 2026-01-22 · 9,781 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 16,109,027 downloads/mo, #1,161 on PyPI

Verify before relying

import re2

pattern = re2.compile(r'\w+')
match = pattern.search('hello world')
if match:
    print(match.group())
  • Performance characteristics compared to standard re module in typical workloads
  • Compatibility with third-party libraries that expect the standard re module API
  • Current status of Windows build support (documentation notes it has not been tested)
Same gist for agents: .md · .json

What it is and what it does

google-re2 wraps Google's RE2 regular expression engine as a Python module that mimics the standard re module's interface. It trades support for some advanced PCRE features—like backreferences and lookaround assertions—for guaranteed linear-time matching and immunity to catastrophic backtracking, making it suitable for processing untrusted input or patterns where performance predictability matters.

The package is a compiled C++ extension, so installation uses prebuilt wheels when available. Its API closely mirrors Python's re module, but with notable differences: pattern and input strings don't need to match types (str is encoded to UTF-8), the Options class replaces re flags with RE2's own options, and error reporting is minimal. The description notes several syntax gotchas relative to Python's re—most notably that \Z must be rewritten as \z.

Use it for

  • Processing untrusted regex patterns or input where catastrophic backtracking is a security concern
  • High-throughput text processing where predictable linear-time performance is required
  • Migrating from re to a safer engine when PCRE features like backreferences are not needed
  • Building systems that need consistent regex behavior across different input types without type coercion

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need predictable regex performance and can accept RE2's syntax limitations.

The permissive license and active repository are favorable. Medium install friction (system libraries required) and aging maintenance status (282 days since release) are minor concerns; the underlying RE2 engine is mature and the package has no known vulnerabilities. Not suitable if your patterns rely on backreferences, lookarounds, or other PCRE-only features.

Install

google-re2 on PyPI

Before you install

Medium install friction: precompiled wheels are available for current Python versions on macOS, Linux, and Windows, but building from source requires RE2 and pybind11 system libraries. The package is aging (282 days since last release) but the underlying repository remains active.

Requires RE2 library and pybind11 to be installed on your system before installation; precompiled wheels available for Python 3.9+ on common platforms.

License in practice

Permissive license (BSD) means you can use, modify, and distribute this package with minimal restrictions, though you should include the license notice in distributions.

Quickstart

import re2

pattern = re2.compile(r'\w+')
match = pattern.search('hello world')
if match:
    print(match.group())

Verify before relying

  • Performance characteristics compared to standard re module in typical workloads
  • Compatibility with third-party libraries that expect the standard re module API
  • Current status of Windows build support (documentation notes it has not been tested)

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release ~=3.9
Install frictionMedium. Platform-specific wheel
Runtime dependenciesNone
MaintenanceAging 282 days since the last release
Last repo commit
First released
Downloads16,109,027 / month, #1,161 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseProgramming Language :: C++Programming Language :: Python :: 3.9

Evidence: google_re2-1.1.20251105-1-cp310-cp310-macosx_13_0_arm64.whl; google_re2-1.1.20251105-1-cp310-cp310-macosx_13_0_x86_64.whl; google_re2-1.1.20251105-1-cp310-cp310-macosx_14_0_arm64.whl; google_re2-1.1.20251105-1-cp310-cp310-macosx_14_0_x86_64.whl; google_re2-1.1.20251105-1-cp310-cp310-macosx_15_0_arm64.whl; google_re2-1.1.20251105-1-cp310-cp310-macosx_15_0_x86_64.whl; google_re2-1.1.20251105-1-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; google_re2-1.1.20251105-1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; google_re2-1.1.20251105-1-cp310-cp310-win32.whl; google_re2-1.1.20251105-1-cp310-cp310-win_amd64.whl; google_re2-1.1.20251105-1-cp311-cp311-macosx_13_0_arm64.whl; google_re2-1.1.20251105-1-cp311-cp311-macosx_13_0_x86_64.whl; google_re2-1.1.20251105-1-cp311-cp311-macosx_14_0_arm64.whl; google_re2-1.1.20251105-1-cp311-cp311-macosx_14_0_x86_64.whl; google_re2-1.1.20251105-1-cp311-cp311-macosx_15_0_arm64.whl; google_re2-1.1.20251105-1-cp311-cp311-macosx_15_0_x86_64.whl; google_re2-1.1.20251105-1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; google_re2-1.1.20251105-1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; google_re2-1.1.20251105-1-cp311-cp311-win32.whl; google_re2-1.1.20251105-1-cp311-cp311-win_amd64.whl

Tags

Capabilities
re2 regex engine pythonlinear time pattern matchinggoogle re2 bindingssafe regex enginere module replacement
Topics
regex-engineperformance-predictablec-extension

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “re2 regex engine python”

  • google-re2A drop-in replacement for Python's re module that uses Google's RE2…
  • google-re2-stubsProvides type stubs for the google-re2 package, enabling static type…
  • onigurumacffiProvides Python bindings to the Oniguruma regex engine via CFFI,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Text Processing packages

regex Worth it
PyPI · Python Modules · released Jul 2026

A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.

Apache-2.0 AND CNRI-Pythoncompiled wheel · 3.10+
437.7Mdownloads / mo
pyparsing Worth it
PyPI · Text Processing · released Jan 2026

pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.

Install it if you need to parse text or define grammars programmatically.

MITpure Python · 3.9+
412.7Mdownloads / mo
fonttools Worth it
PyPI · Text Processing · released May 2026

fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.

Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.

permissive licensepure Python · 3.10+
235.9Mdownloads / mo
docutils With conditions
PyPI · Software Development · released May 2026

Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.

BSD-3-Clausepure Python · 3.9+
225.6Mdownloads / mo
RapidFuzz Worth it
PyPI · Text Processing · released Apr 2026

RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.

Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.

MITcompiled wheel · 3.10+
184.2Mdownloads / mo
tinycss2 Worth it
PyPI · Text Processing · released Nov 2025

tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.

Install it if your project requires CSS tokenization or syntax manipulation.

BSD-3-Clausepure Python · 3.10+
113.2Mdownloads / mo

See also google-re2-stubs · real-regex · backrefs · onigurumacffi · re-assert · flpc · cel-python · repath