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

Uploaded Source

Built Distributions

backrefs-4.6-py39-none-any.whl (378.0 kB view details)

Uploaded Python 3.9

backrefs-4.6-py38-none-any.whl (367.1 kB view details)

Uploaded Python 3.8

backrefs-4.6-py37-none-any.whl (359.3 kB view details)

Uploaded Python 3.7

backrefs-4.6-py36-none-any.whl (335.9 kB view details)

Uploaded Python 3.6

File details

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

File metadata

  • Download URL: backrefs-4.6.tar.gz
  • Upload date:
  • Size: 6.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.9

File hashes

Hashes for backrefs-4.6.tar.gz
Algorithm Hash digest
SHA256 c6ede024bcbbf5a3fc42c27a8ca2e1e962ad1f7073f611fffdf3a3932a812ab0
MD5 53336514ea2c0b4bf86af48252c80e9a
BLAKE2b-256 834d4aeb6e1041b924a68208cc508e0014d3c04e7f4b1dc080d4b96e7d4250de

See more details on using hashes here.

File details

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

File metadata

  • Download URL: backrefs-4.6-py39-none-any.whl
  • Upload date:
  • Size: 378.0 kB
  • Tags: Python 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.9

File hashes

Hashes for backrefs-4.6-py39-none-any.whl
Algorithm Hash digest
SHA256 867a6d066d9a13a889a7901e5913c7cb4bc87b08f0ec51a1d5079e562863f4a8
MD5 eedb58104d62ffb2dd55344aa4b0324b
BLAKE2b-256 7f05b4928eb37565d735f2e79f4ccd0ee4616d88ed26f3b3bfebdc10831a9e6e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: backrefs-4.6-py38-none-any.whl
  • Upload date:
  • Size: 367.1 kB
  • Tags: Python 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.9

File hashes

Hashes for backrefs-4.6-py38-none-any.whl
Algorithm Hash digest
SHA256 a24d74ee9e7ba178c893211377774c37093be58466ed3f9b031a6f27eb2d7aa8
MD5 f360a96e5b5d80944a79593663a5d77d
BLAKE2b-256 5383944eb12acebbc85daf8ab7f7fe8583cc3b7a76d2328be7689101ee3f618b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: backrefs-4.6-py37-none-any.whl
  • Upload date:
  • Size: 359.3 kB
  • Tags: Python 3.7
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.9

File hashes

Hashes for backrefs-4.6-py37-none-any.whl
Algorithm Hash digest
SHA256 89cb63ad84919b8a259c693a1e169ebfb847316f4e5457d1d76d039d8e172139
MD5 7986b6392f994fd3630a4bf873f5e93b
BLAKE2b-256 38a352921c689a240cdd9eea7609699f057e17487ed19f6893d8a26f2f576e6d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: backrefs-4.6-py36-none-any.whl
  • Upload date:
  • Size: 335.9 kB
  • Tags: Python 3.6
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.9

File hashes

Hashes for backrefs-4.6-py36-none-any.whl
Algorithm Hash digest
SHA256 6a5f6f8b141abb64a74e95bbc36487b013c5cc3aca29139f462701ef7440a923
MD5 e804ed2d753c146619dc624866c96bb7
BLAKE2b-256 ac332237dcbde3c35b842176224d415e74dbd60b5700c37036ccf3f967e19c39

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