Python numeric range regular expression generator
Project description
Python numeric range regular expression generator
=========================
Another like packages generates incorrect or excessive patterns.
Installation
=========================
::
pip install range-regex
or
::
git clone git://github.com/dimka665/range-regex.git
Usage
=========================
::
from range_regex import regex_for_range
from range_regex import bounded_regex_for_range
regex_for_range(12, 34)
bounded_regex_for_range(12, 34)
generates
"1[2-9]|2\d|3[0-4]"
"\b(1[2-9]|2\d|3[0-4])\b"
=========================
Another like packages generates incorrect or excessive patterns.
Installation
=========================
::
pip install range-regex
or
::
git clone git://github.com/dimka665/range-regex.git
Usage
=========================
::
from range_regex import regex_for_range
from range_regex import bounded_regex_for_range
regex_for_range(12, 34)
bounded_regex_for_range(12, 34)
generates
"1[2-9]|2\d|3[0-4]"
"\b(1[2-9]|2\d|3[0-4])\b"
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
range-regex-1.0.3.tar.gz
(2.4 kB
view details)
File details
Details for the file range-regex-1.0.3.tar.gz
.
File metadata
- Download URL: range-regex-1.0.3.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f5c451d465eee769df9b110e1c63cd5fe1857f806189359396af84f705a1f68 |
|
MD5 | cdf033f34d9a95a690e8acf8c8d8bcb1 |
|
BLAKE2b-256 | eff229a6ad566daa07b8d6d1ee7bdd75c30e16a421267b7514dfcfda93361596 |