Skip to main content

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

Project description

Unix Build Status Windows Build Status Coverage Requirements Status pypi-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

http://facelessuser.github.io/backrefs/

License

Released under the MIT license.

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

This version
History Node

3.5.1

History Node

3.5

History Node

3.4

History Node

3.3

History Node

3.2.1

History Node

3.2

History Node

3.1.2

History Node

3.1.1

History Node

3.1

History Node

3.0.5

History Node

3.0.4

History Node

3.0.3

History Node

3.0.2

History Node

3.0.1

History Node

3.0

History Node

2.3rc1

History Node

2.3b5

History Node

2.3b4

History Node

2.3b3

History Node

2.3b2

History Node

2.3b1

History Node

2.2

History Node

2.1

History Node

2.1b2

History Node

2.1b1

History Node

1.0.2

History Node

1.0.1

History Node

1.0.post1

History Node

1.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
backrefs-3.5.1.tar.gz (5.9 MB) Copy SHA256 hash SHA256 Source None Jun 4, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page