Work with RegEx with relative ease. Partly inspired by magic-regexp for Node
Project description
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
Release history Release notifications | RSS feed
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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file remagic-0.1.1.tar.gz.
File metadata
- Download URL: remagic-0.1.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
436d91920d9f61832311587cae66f8a3a043dc55fb80c60ad4d9ff81b5c57b5d
|
|
| MD5 |
6ea593ef151c28a0b34732d1a159e27d
|
|
| BLAKE2b-256 |
492150df314dc11543d3c6edce7443f9db88af688ce6d6f24791aa96055fd163
|
File details
Details for the file remagic-0.1.1-py3-none-any.whl.
File metadata
- Download URL: remagic-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
474051eee389b1436200754392b0d7620122584e2ba36d2ad0fdd3870a956af7
|
|
| MD5 |
4e0879ff42003d9cfd470d01d1a2afc5
|
|
| BLAKE2b-256 |
da9e30c6ee6b72e3b9bb682377bc993085969fa156f3ff84349639e4c2b86bb7
|