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.
--HG-- rename : range_regex.py => range_regex/range_regex.py rename : tests.py => range_regex/tests.py
- Loading branch information
Showing
5 changed files
with
53 additions
and
9 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,21 +1,31 @@ | ||
The nicest numeric range regular expression generator | ||
Python numeric range regular expression generator | ||
========================= | ||
|
||
Another like modules generates incorrect or excessive patterns. | ||
Another like packages generates incorrect or excessive patterns. | ||
|
||
Installation | ||
========================= | ||
:: | ||
|
||
git clone git://github.com/dimka665/range-regex.git | ||
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 | ||
|
||
generates ``"1[2-9]|2\d|3[0-4]"`` | ||
"1[2-9]|2\d|3[0-4]" | ||
"\b(1[2-9]|2\d|3[0-4])\b" |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
__author__ = 'dimka' | ||
|
||
from .range_regex import range_to_pattern, bounded_regex_for_range |
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
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
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from distutils.core import setup | ||
|
||
long_description = open('README.rst').read() | ||
|
||
setup( | ||
name='range-regex', | ||
version='1.0', | ||
description='Python numeric range regular expression generator', | ||
long_description=long_description, | ||
url='http://github.com/dimka665/range-ragex', | ||
author='Dmitry Voronin', | ||
author_email='[email protected]', | ||
license='Python Software Foundation License', | ||
packages=['range_regex'], | ||
platforms=['any'], | ||
classifiers=[ | ||
'Development Status :: 5 - Production/Stable', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: Python Software Foundation License', | ||
'Natural Language :: English', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python', | ||
'Environment :: Web Environment', | ||
], | ||
) |