A wrapper around re and regex that adds additional back references.
Project Links
Meta
Author: Isaac Muse
Requires Python: >=3.9
Classifiers
Development Status
- 5 - Production/Stable
Environment
- Console
Intended Audience
- Developers
License
- OSI Approved :: MIT License
Operating System
- OS Independent
Programming Language
- Python :: 3
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
- Python :: 3.14
Topic
- Software Development :: Libraries :: Python Modules
Typing
- Typed
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
Jul 30, 2025
6.0.1
Jul 29, 2025
6.0
Jun 22, 2025
5.9
Feb 25, 2025
5.8
Jun 16, 2024
5.7.post1
Sep 02, 2023
5.6.post1
Sep 02, 2023
5.6
Aug 30, 2023
5.5.1
Jun 15, 2023
5.5
Oct 27, 2022
5.4
May 21, 2022
5.3
Nov 02, 2021
5.2
Oct 20, 2021
5.1
Jan 23, 2021
5.0.1
Jan 22, 2021
5.0
Jan 09, 2021
4.6
Aug 14, 2020
4.5
Jun 30, 2020
4.4
Jan 19, 2020
4.3
Nov 14, 2019
4.2.1
Aug 04, 2019
4.2
May 11, 2019
4.1.1
Mar 23, 2019
4.1
Feb 20, 2019
4.0.2
Feb 07, 2019
4.0.1
Dec 02, 2018
4.0
Dec 02, 2018
3.6
Aug 10, 2018
3.5.2
Jun 04, 2018
3.5.1
Mar 14, 2018
3.5
Mar 08, 2018
3.4
Feb 27, 2018
3.3
Feb 26, 2018
3.2.1
Feb 26, 2018
3.2
Feb 12, 2018
3.1.2
Feb 12, 2018
3.1.1
Feb 11, 2018
3.1
Feb 10, 2018
3.0.5
Feb 09, 2018
3.0.4
Jan 28, 2018
3.0.3
Jan 23, 2018
3.0.2
Jan 21, 2018
3.0.1
Jan 20, 2018
3.0
Jan 19, 2018
2.3rc1
Jan 17, 2018
2.3b5
Jan 16, 2018
2.3b4
Jan 15, 2018
2.3b3
Jan 14, 2018
2.3b2
Jan 13, 2018
2.3b1
Dec 11, 2017
2.2
Sep 30, 2017
2.1
Sep 29, 2017
2.1b2
Sep 28, 2017
2.1b1
Aug 06, 2017
1.0.2
Jan 17, 2017
1.0.1
May 04, 2016
1.0.post1
May 02, 2016
1.0