A functional wrapper for RegEx in Python.
Project description
RegexBuilder: A functional wrapper for RegEx in Python.
Installation
python -m pip install regexbuilder-py
# or
python -m pip install git+https://github.com/AaravMalani/regexbuilder
Usage
print(RegEx().start() \
.string('http') \
.chars('s').modify(Modifiers.ZERO_OR_ONE) \
.string('://') \
.group(RegEx()
.chars('a-zA-Z0-9') \
.modify(Modifiers.ONE_OR_MORE) \
.chars(r'.')) \
.modify(Modifiers.ZERO_OR_MORE) \
.chars('A-Za-z0-9').modify(Modifiers.ONE_OR_MORE) \
.chars('.') \
.chars('A-Za-z').modify(Modifiers.ONE_OR_MORE) \
.group(RegEx().string('.')).build())
# $(?:http)[s]?(?:://)([a-zA-Z0-9]+[.])*[A-Za-z0-9]+[.][A-Za-z]+((?:.))
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
regexbuilder-py-1.0.0.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for regexbuilder_py-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d2881adc049518cd3c11bd46acb4af0a18873a04eb76e4e31a1251894be0aba |
|
MD5 | e21e053c3501f0005fd09157695563f1 |
|
BLAKE2b-256 | 4bdc2416dc0a04d1dc8d47b6ef18516a423bcde9a62f80ce72d1460c66898fde |