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 - 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


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.0.1.tar.gz (4.1 MB view details)

Uploaded Source

Built Distributions

backrefs-5.0.1-py39-none-any.whl (376.3 kB view details)

Uploaded Python 3.9

backrefs-5.0.1-py38-none-any.whl (365.4 kB view details)

Uploaded Python 3.8

backrefs-5.0.1-py37-none-any.whl (357.5 kB view details)

Uploaded Python 3.7

backrefs-5.0.1-py36-none-any.whl (339.4 kB view details)

Uploaded Python 3.6

File details

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

File metadata

  • Download URL: backrefs-5.0.1.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for backrefs-5.0.1.tar.gz
Algorithm Hash digest
SHA256 b66bd67bc715379915c76e70212a9fb71ff17b51a561ce49e717db5e80db2db2
MD5 e888a1c65318c8aee50b046d6075d3eb
BLAKE2b-256 9a4ff88621babe0b7b4b609f03670b2abc51e22cbe5b961f6f5050df1f3644b2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: backrefs-5.0.1-py39-none-any.whl
  • Upload date:
  • Size: 376.3 kB
  • Tags: Python 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for backrefs-5.0.1-py39-none-any.whl
Algorithm Hash digest
SHA256 50480e6c12382d0431e6f564a9fd7fd21d16239d582a56422d9d5f465b35986a
MD5 6c654cd07d6631ea264aba21488f2755
BLAKE2b-256 46d086cf7ffaf9ca54d2616e465e3aeb9f0afe1ba785f8f4b1542c9c323f86dc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: backrefs-5.0.1-py38-none-any.whl
  • Upload date:
  • Size: 365.4 kB
  • Tags: Python 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for backrefs-5.0.1-py38-none-any.whl
Algorithm Hash digest
SHA256 1eacee5d32d20e4d29c69eed6422cc40e5cb21a77ae100d5cda6d0882c3d8b06
MD5 64f8c869913eed2f3ef6e91b40ceff12
BLAKE2b-256 a340f63a18ae50d3c028375392c97687fdc46f3de0d2d36334356d1e7db8b4ce

See more details on using hashes here.

File details

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

File metadata

  • Download URL: backrefs-5.0.1-py37-none-any.whl
  • Upload date:
  • Size: 357.5 kB
  • Tags: Python 3.7
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for backrefs-5.0.1-py37-none-any.whl
Algorithm Hash digest
SHA256 4fba84bb1d3cf77fc1f70b020ba0bfdb545df89aeb17cfc5bfd98b202fdd66c1
MD5 b7aee369b53d08e500cc5a0288c40a85
BLAKE2b-256 2c1a7d5c4565b651e9089febb37a5d075c6fd67b1a42145acd318f7365935f25

See more details on using hashes here.

File details

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

File metadata

  • Download URL: backrefs-5.0.1-py36-none-any.whl
  • Upload date:
  • Size: 339.4 kB
  • Tags: Python 3.6
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for backrefs-5.0.1-py36-none-any.whl
Algorithm Hash digest
SHA256 58ef3fc37eb6626ef525d05f9af75986b7eb77a37678fb224993c16c812e9bb4
MD5 070f9554718cce2c051828618b0809fe
BLAKE2b-256 0d29fa137f09a1ed4b95eba74d7e045708c2cce0cc2fd0be9b530877cd37b18f

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