{"categories":[{"label":"Text Processing","url":"https://skillfed.io/packages/category/text-processing"}],"enrichment":{"capability":"A drop-in replacement for Python's re module that uses Google's RE2 engine for pattern matching, trading some PCRE features for guaranteed linear-time performance.","skillfed_tags":["regex-engine","performance-predictable","c-extension"],"use_cases":["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"],"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\u2014like backreferences and lookaround assertions\u2014for guaranteed linear-time matching and immunity to catastrophic backtracking, making it suitable for processing untrusted input or patterns where performance predictability matters.\n\nThe 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\u2014most notably that \\Z must be rewritten as \\z.","worth_installing":"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."},"id":"google-re2","links":{"html":"https://skillfed.io/packages/google-re2","md":"https://skillfed.io/packages/google-re2.md","pypi":"https://pypi.org/project/google-re2/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-11-05","license_spdx":null,"license_treatment":"permissive","name":"google-re2","python_support":"supports_current","summary":"RE2 Python bindings"},"popularity":{"monthly_downloads":16109027,"position":1161,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.1.20251105"}
