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.1.tar.gz (6.3 kB view hashes)

Uploaded Source

Built Distribution

remagic-0.1.1-py3-none-any.whl (6.0 kB view hashes)

Uploaded Python 3

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