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 details)
Built Distribution
File details
Details for the file regexbuilder-py-1.0.0.tar.gz
.
File metadata
- Download URL: regexbuilder-py-1.0.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42fbda950c6f5cf4bee1eb07c9d463e2607eb8e2f36840985b6e2019f22011f7 |
|
MD5 | 64fc93ae73f1bfe0a67b3d8994ccd067 |
|
BLAKE2b-256 | fa2c0ff0a589387137b5d08a6b8471064da120edf80fb84984706fe35457652c |
File details
Details for the file regexbuilder_py-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: regexbuilder_py-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d2881adc049518cd3c11bd46acb4af0a18873a04eb76e4e31a1251894be0aba |
|
MD5 | e21e053c3501f0005fd09157695563f1 |
|
BLAKE2b-256 | 4bdc2416dc0a04d1dc8d47b6ef18516a423bcde9a62f80ce72d1460c66898fde |