Maker Regular Expressions
Project description
Maker Regular Expression
This is a simple package to make regular expressions in Python.
pip install mre
- Test regex: Regex101;
- Regular expression operations.
Documentation:
- da-DK :denmark: (v. 1.0)
- de-DE :de: (v. 1.0)
- en-US :us: (v. 1.1)
- es-ES :es: (v. 1.0)
- pt-BR :brazil: (v. 1.2)
- uk-UA :ukraine: (v. 1.0)
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
mre-0.10.0-py3-none-any.whl
(11.5 kB
view hashes)