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]+((?:.))
Release files for regexbuilder-py 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| regexbuilder-py-1.0.0.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| regexbuilder_py-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.9 kB
Release files / regexbuilder-py-1.0.0.tar.gz
| Download URL | regexbuilder-py-1.0.0.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
42fbda950c6f5cf4bee1eb07c9d463e2607eb8e2f36840985b6e2019f22011f7
|
|
BLAKE2b-256 checksum How to use checksums |
fa2c0ff0a589387137b5d08a6b8471064da120edf80fb84984706fe35457652c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / regexbuilder_py-1.0.0-py3-none-any.whl
| Download URL | regexbuilder_py-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7d2881adc049518cd3c11bd46acb4af0a18873a04eb76e4e31a1251894be0aba
|
|
BLAKE2b-256 checksum How to use checksums |
4bdc2416dc0a04d1dc8d47b6ef18516a423bcde9a62f80ce72d1460c66898fde
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|