forked from voronind/range-regex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,29 @@ | ||
==================================================== | ||
Python numeric range regular expression generator | ||
========================= | ||
==================================================== | ||
|
||
Another like packages generates incorrect or excessive patterns. | ||
|
||
Installation | ||
========================= | ||
:: | ||
------------ | ||
|
||
pip install range-regex | ||
``pip install range-regex`` | ||
|
||
or | ||
|
||
:: | ||
|
||
git clone git://github.com/dimka665/range-regex.git | ||
``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" | ||
|
||
|