Maker Regular Expressions
Project description
Maker Regular Expression
This a simple package to make regular expression in Python.
pip install mre
- Test regex: Regex101;
- Regular expression operations.
Documentation:
Examples
from mre import Regex, Group
rgx_one = Regex("Hello world") # Hello world
rgx_two = Regex("Hello", " world") # Hello world
rgx_three = Regex("Hello") + " " + Regex("world") # Hello world
rgx_four = Regex('<', Group('h[1-6]'), '>') # <(h[1-6])>
rgx_five = Regex('<', Regex.SLASH, 1, '>') # <\/\1>
from mre import Regex, Set
# All digits
digits = Set(Regex("0-9"))
rgx_cep = Regex(
digits.quantifier(5),
Regex("-").quantifier(0, 1),
digits.quantifier(3),
)
# Output: [0-9]{5}-?[0-9]{3}
Contributing documentation
pip install -r requirements-dev.txt
Running documentation
mkdocs serve
Change or create files in the docs folder.
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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
mre-0.9.0-py3-none-any.whl
(10.9 kB
view details)
File details
Details for the file mre-0.9.0-py3-none-any.whl.
File metadata
- Download URL: mre-0.9.0-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
504ac8b0dacc0fe7cf921c2b1d8f3bc38790e9906ab9e4520c062ae3d00fe893
|
|
| MD5 |
9ec67378f78e6d023187eb20051387a5
|
|
| BLAKE2b-256 |
7d65cdba0bc608cca5942115a1d49fc45f36760f6748cb86412395d960991107
|