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

Uploaded Source

Built Distributions

backrefs-5.0-39-none-any.whl (376.3 kB view details)

Uploaded

backrefs-5.0-38-none-any.whl (365.4 kB view details)

Uploaded

backrefs-5.0-37-none-any.whl (357.4 kB view details)

Uploaded

backrefs-5.0-36-none-any.whl (339.3 kB view details)

Uploaded

File details

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

File metadata

  • Download URL: backrefs-5.0.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.tar.gz
Algorithm Hash digest
SHA256 5a99074a38c59aaca0b30da54ce714ae06263b6a544f2278483ceb42933dc529
MD5 3f78b834f0b99ca7968aaf43f4a871fa
BLAKE2b-256 d2a6d1c16c1aca7b3c01c1ec0e2d6a2f130a37050f1947cfb40f06c382124b44

See more details on using hashes here.

File details

Details for the file backrefs-5.0-39-none-any.whl.

File metadata

  • Download URL: backrefs-5.0-39-none-any.whl
  • Upload date:
  • Size: 376.3 kB
  • Tags:
  • 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-39-none-any.whl
Algorithm Hash digest
SHA256 be97baf305aae288ae2c750a158432a1450ccd81e1cc53b2060c1f7d55b4de0c
MD5 a2bcee2c63d77cc3179560c2d94e118b
BLAKE2b-256 e54e42eec6fb49e1b84e7946d6ab8c2d4d6fea917dc1699bf8a96f9e8841113e

See more details on using hashes here.

File details

Details for the file backrefs-5.0-38-none-any.whl.

File metadata

  • Download URL: backrefs-5.0-38-none-any.whl
  • Upload date:
  • Size: 365.4 kB
  • Tags:
  • 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-38-none-any.whl
Algorithm Hash digest
SHA256 7e6d17f6776aebf924ce1f787c7d000d31f13f51ce23b833d584f0a31cf1bc3b
MD5 4145377660b57cde2d6d6d30d297bddd
BLAKE2b-256 0ab3292661c1a7c92e22fbe8e3ba187547a8e3d7afe5c7ebe8ef0266c446877f

See more details on using hashes here.

File details

Details for the file backrefs-5.0-37-none-any.whl.

File metadata

  • Download URL: backrefs-5.0-37-none-any.whl
  • Upload date:
  • Size: 357.4 kB
  • Tags:
  • 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-37-none-any.whl
Algorithm Hash digest
SHA256 74d5963653a3505dfb56085a8bcda910ecf172df17e1aad9f58586dd631c55ae
MD5 fda12c66a660b4653d8fc32c55611a44
BLAKE2b-256 3a040edac02293bb7676d6ff966c346f2780f79036a1cc4b831221b4da7378be

See more details on using hashes here.

File details

Details for the file backrefs-5.0-36-none-any.whl.

File metadata

  • Download URL: backrefs-5.0-36-none-any.whl
  • Upload date:
  • Size: 339.3 kB
  • Tags:
  • 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-36-none-any.whl
Algorithm Hash digest
SHA256 bb0c07a2bdebd1bd328358974f941211d931ea4785dfdefd6d32a38735a4e588
MD5 cbe05e4898fa3371bd756512cd35c4f5
BLAKE2b-256 be60c601156f7061b13850e99a0bda0523600eba163d558735c9a248514ab41a

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