Skip to main content

python regular expressions for humans

Project description

re_patterns

python regular expressions for humans

Description

This module helps you build complex regular expressions.

Usage

Example:

>>> from re_patterns import Rstr

>>> regex = Rstr("Isaac").not_followed_by("Newton").named("non_newtonians")
>>> regex
'(?P<non-newtonians>Isaac(?!Newton))'
>>> match = regex.search("Isaac Lobkowicz, Isaac Newton")
>>> match.span()
(0, 5)
>>> match.group("non_newtonians")
'Isaac'

For further uses please look at the methods of the Rstr class in __init__.py.

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

re_patterns-1.1.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

re_patterns-1.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file re_patterns-1.1.0.tar.gz.

File metadata

  • Download URL: re_patterns-1.1.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for re_patterns-1.1.0.tar.gz
Algorithm Hash digest
SHA256 aea86581037447bacaad1a40294780f23c246b58328535889ab6de7e411b34be
MD5 cee272e7ebc420f8aafdee60bf77f576
BLAKE2b-256 af8e1b695e152b01dcec567df4ffbe3aa545676c3e1e667a7b126290220898b7

See more details on using hashes here.

File details

Details for the file re_patterns-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: re_patterns-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for re_patterns-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 342c266616498efbd9bab801ff568afe5295f489e0e153a49a324ce0e82813ca
MD5 6fc8198c9b723c3221e6ca2440510a63
BLAKE2b-256 9a0eaa8b8aed4a9b49aea7ecc42f46ad0837519ebda14d7526ac2afe08bd332c

See more details on using hashes here.

Supported by

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