A wrapper around re and regex that adds additional back references.
Project description
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
Released under the MIT license.
Copyright (c) 2015 - 2021 Isaac Muse isaacmuse@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file backrefs-5.1.tar.gz
.
File metadata
- Download URL: backrefs-5.1.tar.gz
- Upload date:
- Size: 5.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab72cacd2453a1d1d1e2e34afe8ef1b9ec7f2dea1a74f35e90865f921b0427db |
|
MD5 | 42c21476ac48d79eb546729f9553a408 |
|
BLAKE2b-256 | fd61a989915089d2b633a71580dfdb1faa0ac2e39154725b4a593ae7072bf3f5 |
Provenance
File details
Details for the file backrefs-5.1-py310-none-any.whl
.
File metadata
- Download URL: backrefs-5.1-py310-none-any.whl
- Upload date:
- Size: 376.3 kB
- Tags: Python 3.10
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b75165cfb27e4768f612248cc4e204a81d2b58948f351d7d770eea7aa81144dc |
|
MD5 | c4d45ef0797e52329c28c48a0a64634d |
|
BLAKE2b-256 | ffc688d1a11bd1f816147ebbf0f49133e8314cfbdc54616f33ff7454dc529845 |
Provenance
File details
Details for the file backrefs-5.1-py39-none-any.whl
.
File metadata
- Download URL: backrefs-5.1-py39-none-any.whl
- Upload date:
- Size: 376.3 kB
- Tags: Python 3.9
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3483c736ee932c7aaf39a69c9ddbd5c674b1d334da0d423f5f3b7b485651a11 |
|
MD5 | 043fec76e7476c3045910d64788eb14f |
|
BLAKE2b-256 | 48b9da02bf8588b6d82642a68b097585644baa5dfd50ddad00a82888f7c3ca90 |
Provenance
File details
Details for the file backrefs-5.1-py38-none-any.whl
.
File metadata
- Download URL: backrefs-5.1-py38-none-any.whl
- Upload date:
- Size: 365.4 kB
- Tags: Python 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 599a285275588a3f5bf0c0b3a34e3f3882efca8e2a32e34c87e024658b64475e |
|
MD5 | cdd02f72967af7fdf16aefa3fe21ba1a |
|
BLAKE2b-256 | c898b0775aa5588865211b6cf5ae78038c44b699f8a02dbbcc69771bb74fc6c2 |
Provenance
File details
Details for the file backrefs-5.1-py37-none-any.whl
.
File metadata
- Download URL: backrefs-5.1-py37-none-any.whl
- Upload date:
- Size: 357.5 kB
- Tags: Python 3.7
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89df1ae28cc37278c2f0447fcc025fea54bfe5668630555e29a8bc12785cb1ce |
|
MD5 | 9af22c8420d3f611d5152a6a6b29a73d |
|
BLAKE2b-256 | 1d02e1bf20c95a6ce38bcfa263f88d53855b90208199b76bdc3a3f81f3390542 |
Provenance
File details
Details for the file backrefs-5.1-py36-none-any.whl
.
File metadata
- Download URL: backrefs-5.1-py36-none-any.whl
- Upload date:
- Size: 339.4 kB
- Tags: Python 3.6
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1053d8369b5cdf3ee039425af03d2e422609e1e7c8903208a95d841cbb0ac4c5 |
|
MD5 | 4f1f98fabedb6a63713b4e386bb34371 |
|
BLAKE2b-256 | 1d90e94b008754f847a1a51f209229ad3419367773c08a6bf480cc1d97f7cfb0 |