Skip to content
Python integer range regexp generator module
Branch: master
Clone or download
voronind Merge pull request #2 from mbayadinov/master
Fixed excessive pattern and enhanced to support negative ranges
1
Latest commit 57479ff Feb 28, 2014
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
range_regex
.gitignore Typo fix Jul 9, 2013
.hgignore setup.py improvement Jul 9, 2013
README.rst Update README.rst Jul 10, 2013
license.txt license.txt: Initial commit Dec 19, 2013
setup.py

README.rst

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

regex_for_range(12, 34)

generates

"1[2-9]|2\d|3[0-4]"
You can’t perform that action at this time.