Skip to content

antonc42/range-regex

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python numeric range regular expression generator

Another like packages generates incorrect or excessive patterns.

Installation

pip install git+https://github.com/antonc42/range-regex.git

or

git clone https://github.com/antonc42/range-regex.git
pip install ./range-regex

Usage

from range_regex import bounded_regex_for_range, 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"

About

Python integer range regexp generator module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%