Skip to main content

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

Project description

Donate via PayPal Discord Build Coverage Status PyPI Version 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

Released under the MIT license.

Copyright (c) 2015 - 2022 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

backrefs-5.3.tar.gz (4.3 MB view details)

Uploaded Source

Built Distributions

backrefs-5.3-py310-none-any.whl (380.6 kB view details)

Uploaded Python 3.10

backrefs-5.3-py39-none-any.whl (380.6 kB view details)

Uploaded Python 3.9

backrefs-5.3-py38-none-any.whl (369.7 kB view details)

Uploaded Python 3.8

backrefs-5.3-py37-none-any.whl (361.8 kB view details)

Uploaded Python 3.7

backrefs-5.3-py36-none-any.whl (343.6 kB view details)

Uploaded Python 3.6

File details

Details for the file backrefs-5.3.tar.gz.

File metadata

  • Download URL: backrefs-5.3.tar.gz
  • Upload date:
  • Size: 4.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.13

File hashes

Hashes for backrefs-5.3.tar.gz
Algorithm Hash digest
SHA256 25721eeb88cd456a5131abd296f116ec526d1a9cee8f002bd1a9cd7791ed8594
MD5 62c2b9abb6c5ecd24be3ffb5218df217
BLAKE2b-256 383160466757bfe93ee6b7c077f6cc7720103ff4444d6c4dc6a55cd26d993f09

See more details on using hashes here.

File details

Details for the file backrefs-5.3-py310-none-any.whl.

File metadata

  • Download URL: backrefs-5.3-py310-none-any.whl
  • Upload date:
  • Size: 380.6 kB
  • Tags: Python 3.10
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.13

File hashes

Hashes for backrefs-5.3-py310-none-any.whl
Algorithm Hash digest
SHA256 5d37d18bf19eca2b7a1b0528ba9fd4ae9c82853736da2f5f1a289ef202f58039
MD5 cfe28f045b1a9a69ccdd3c55309a42c1
BLAKE2b-256 e7e0b5454c169b9c84a387fd79a64f3387d2251f640ff5f75b5249b582a545fe

See more details on using hashes here.

File details

Details for the file backrefs-5.3-py39-none-any.whl.

File metadata

  • Download URL: backrefs-5.3-py39-none-any.whl
  • Upload date:
  • Size: 380.6 kB
  • Tags: Python 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.13

File hashes

Hashes for backrefs-5.3-py39-none-any.whl
Algorithm Hash digest
SHA256 020a303acbe37ccecf1a42d3105ed2e301a53c4a2a46d1d0e303818711f28fcb
MD5 e5051279f10a4fd2768bd8ad4cade0ce
BLAKE2b-256 782c7205293b531e07a429e80b24f4d24d2b6f99356325881731014ec30bb868

See more details on using hashes here.

File details

Details for the file backrefs-5.3-py38-none-any.whl.

File metadata

  • Download URL: backrefs-5.3-py38-none-any.whl
  • Upload date:
  • Size: 369.7 kB
  • Tags: Python 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.13

File hashes

Hashes for backrefs-5.3-py38-none-any.whl
Algorithm Hash digest
SHA256 5968316295d51a05b31d23e082e3474861c8115b2676d07f86b094119fe55658
MD5 719dc7f952c2483d8c016a5288611def
BLAKE2b-256 61da03eebb08962fe5b84a3436634cc1b7434c933a6f16e81c9e815fcd387d1f

See more details on using hashes here.

File details

Details for the file backrefs-5.3-py37-none-any.whl.

File metadata

  • Download URL: backrefs-5.3-py37-none-any.whl
  • Upload date:
  • Size: 361.8 kB
  • Tags: Python 3.7
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.13

File hashes

Hashes for backrefs-5.3-py37-none-any.whl
Algorithm Hash digest
SHA256 e8f50c99d9b068a1164ce156a437f2aa674d3f7c312ff2492b75a54c9f8fb388
MD5 01e6369da69a9fd2e3ba9fec5f7ba16d
BLAKE2b-256 8afc467d4f90f4caa6a2253fe8ccaea11da9e2783ac4ba961b04c47fc38999df

See more details on using hashes here.

File details

Details for the file backrefs-5.3-py36-none-any.whl.

File metadata

  • Download URL: backrefs-5.3-py36-none-any.whl
  • Upload date:
  • Size: 343.6 kB
  • Tags: Python 3.6
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.13

File hashes

Hashes for backrefs-5.3-py36-none-any.whl
Algorithm Hash digest
SHA256 5153b618a02869c6fbf6a0db854d8b3c27374a07033efa1c8d7b0b95cd3396e2
MD5 283f7e577497439c44640b62bf25bc32
BLAKE2b-256 2924c31d59cfd9e45713c316bdaa8d1835ba654ead9a3c021fded83bfb56fd8d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page