Skip to main content

Work with RegEx with relative ease. Partly inspired by magic-regexp for Node

Project description

Coverage Status

remagic

Working with regex made easier!

Partly inspired from magic-regexp for Node

from remagic import *

pattern1 = create(DIGIT)  # matches any digit

pattern2 = char_in("aeiou")  # matches any char in "aeiou"

pattern3 = ~pattern2  # negates the pattern in pattern2, 

# i.e. match everything except characters in "aeiou"

pattern4 = pattern1 + pattern3

# finally compile, use standard flags as optional argument

R = pattern4.compile()

# use the regex later

Installation

Install from PyPI:

pip install remagic

Work in Progress!

Documentation

TODO: docs

Known bugs

  • improper behaviour with any_of

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

remagic-0.1.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

remagic-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file remagic-0.1.0.tar.gz.

File metadata

  • Download URL: remagic-0.1.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.9

File hashes

Hashes for remagic-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f60f21aa2f7994afc599dd712d0a8fa8293f1c0a3a4d1f74fac29a57f540b10c
MD5 6d19df6250df0183ff40f437c0b0741a
BLAKE2b-256 8de678a04c6da0195e61883f38fb375696915e7502a4158a9ced71676f596fec

See more details on using hashes here.

File details

Details for the file remagic-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: remagic-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.9

File hashes

Hashes for remagic-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c02a137b3d6ee44e6174bc43ecf803c5b28e1e0f24ed6ce0ec9103b7789bcf5
MD5 7a06eeb182983523a339273935dddbf1
BLAKE2b-256 3273dcba8c70c764be59e3b724e1e2b37f94acb11d2c39fc655da2cfc5599f30

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