backrefs
A wrapper around re and regex that adds additional back references.
Decision gist · record as of 2026-08-14
Yes, if you need extended regex features like Unicode properties or case-conversion backreferences. The package is actively maintained, has no dependencies, installs easily, carries a permissive MIT license, and ranks in the top 5000 PyPI packages. Install only if your patterns genuinely require features beyond standard re or regex; otherwise, the added layer is unnecessary.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction installation with wheels available for Python 3.10 through 3.14.
- Package is actively maintained with a recent release (19 days ago) and no runtime dependencies.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in commercial and private projects with minimal attribution requirements.
last release 2026-07-26 (19 days) · last repo commit 2026-07-26 · 13 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 13,528,784 downloads/mo, #1,276 on PyPI
Alternatives
Verify before relying
from backrefs import bre
pattern = bre.compile(r'(\p{Letter}+)')
result = pattern.sub(r'\C\1\E', 'sometext')- Whether the package wraps both re and regex engines or primarily one of them in typical usage.
- Performance overhead compared to direct re or regex library calls.
- Scope and completeness of backreference features supported across different regex engines.
What it is and what it does
Backrefs is a wrapper around Python's built-in re module and the third-party regex library that adds backreference syntax and features not available in either engine natively. It enables patterns like Unicode property escapes (\p{Letter}) and case-conversion backreferences (\C, \E) that are common in other regex engines but absent from Python's standard tools.
The package is designed for developers who need advanced regex capabilities within Python without rewriting patterns or switching languages. It sits as a compatibility layer, translating extended syntax into operations the underlying engine can execute. With no runtime dependencies and support for current Python versions, it integrates as a drop-in replacement for re or regex in projects requiring these additional features.
Use it for
- Converting matched text to uppercase or other cases using backreferences in substitutions.
- Writing regex patterns with Unicode property classes like \p{Letter} or \p{Digit}.
- Porting regex patterns from other languages that support extended backreferences into Python.
- Processing multilingual text where Unicode character properties simplify pattern matching.
- Building text transformation pipelines that rely on advanced regex features.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need extended regex features like Unicode properties or case-conversion backreferences.
The package is actively maintained, has no dependencies, installs easily, carries a permissive MIT license, and ranks in the top 5000 PyPI packages. Install only if your patterns genuinely require features beyond standard re or regex; otherwise, the added layer is unnecessary.
Install
backrefs on PyPI
Before you install
Low friction installation with wheels available for Python 3.10 through 3.14. Package is actively maintained with a recent release (19 days ago) and no runtime dependencies.
Requires Python 3.10 or later.
License in practice
MIT license permits unrestricted use, modification, and distribution in commercial and private projects with minimal attribution requirements.
Quickstart
from backrefs import bre
pattern = bre.compile(r'(\p{Letter}+)')
result = pattern.sub(r'\C\1\E', 'sometext')
Verify before relying
- Whether the package wraps both re and regex engines or primarily one of them in typical usage.
- Performance overhead compared to direct re or regex library calls.
- Scope and completeness of backreference features supported across different regex engines.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 19 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 13,528,784 / month, #1,276 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed |
Evidence: backrefs-8.0-py310-none-any.whl; backrefs-8.0-py311-none-any.whl; backrefs-8.0-py312-none-any.whl; backrefs-8.0-py313-none-any.whl; backrefs-8.0-py314-none-any.whl
Tags
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 › “regex backreferences”
- backrefsBackrefs extends Python's re and regex libraries with additional…
- google-re2A drop-in replacement for Python's re module that uses Google's RE2…
- interegularInteregular checks whether pairs of Python regular expressions can…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also google-re2 · regex · regexploit · bracex · real-regex · pymdown-extensions · flpc · rebulk · iregexp-check · weakrefmethod