backrefs (5.9)

Published 2025-08-28 23:47:01 +02:00 by eofredj

Installation

pip install --index-url  backrefs

About this package

A wrapper around re and regex that adds additional back references.

Donate via PayPal Build Coverage Status PyPI Version PyPI Downloads PyPI - Python Version License

Backrefs

Backrefs is a wrapper around Python's built-in Re and the 3rd party Regex library. Backrefs adds various additional back references (and a couple other features) that are known to some regular expression engines, but not to Python's Re and/or Regex. The supported back references actually vary depending on the regular expression engine being used as the engine may already have support for some.

>>> from backrefs import bre
>>> pattern = bre.compile(r'(\p{Letter}+)')
>>> pattern.sub(r'\C\1\E', 'sometext')
'SOMETEXT'

Documentation

https://facelessuser.github.io/backrefs/

License

MIT

Requirements

Requires Python: >=3.9
Details
PyPI
2025-08-28 23:47:01 +02:00
34
389 KiB
Assets (1)
Versions (2) View all
5.9 2025-08-28
5.8 2025-04-12