backrefs

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

60 个版本 Python >=3.10
安装
pip install backrefs
poetry add backrefs
pipenv install backrefs
conda install backrefs
描述

Donate via PayPal 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

版本列表
7.0 2026-04-28
6.2 2026-02-16
6.1 2025-11-15
6.0.1 2025-07-30
6.0 2025-07-29
5.9 2025-06-22
5.8 2025-02-25
5.7.post1 2024-06-16
5.6 2023-09-02
5.6.post1 2023-09-02
5.5.1 2023-08-30
5.5 2023-06-15
5.4 2022-10-27
5.3 2022-05-21
5.2 2021-11-02
5.1 2021-10-20
5.0.1 2021-01-23
5.0 2021-01-22
4.6 2021-01-09
4.5 2020-08-14
4.4 2020-06-30
4.3 2020-01-19
4.2.1 2019-11-14
4.2 2019-08-04
4.1.1 2019-05-11
4.1 2019-03-23
4.0.2 2019-02-20
4.0.1 2019-02-07
4.0 2018-12-02
3.6 2018-12-02
3.5.2 2018-08-10
3.5.1 2018-06-04
3.5 2018-03-14
3.4 2018-03-08
3.3 2018-02-27
3.2.1 2018-02-26
3.2 2018-02-26
3.1.2 2018-02-12
3.1.1 2018-02-12
3.1 2018-02-11
3.0.5 2018-02-10
3.0.4 2018-02-09
3.0.3 2018-01-28
3.0.2 2018-01-23
3.0.1 2018-01-21
3.0 2018-01-20
2.2 2017-12-11
2.1 2017-09-30
2.3rc1 2018-01-19
2.3b5 2018-01-17
2.3b4 2018-01-16
2.3b3 2018-01-15
2.3b2 2018-01-14
2.3b1 2018-01-13
2.1b2 2017-09-29
2.1b1 2017-09-28
1.0.2 2017-08-06
1.0.1 2017-01-17
1.0 2016-05-02
1.0.post1 2016-05-04