range-regex icon indicating copy to clipboard operation
range-regex copied to clipboard

Python integer range regexp generator module

Results 7 range-regex issues
Sort by recently updated
recently updated
newest added

First of all, thanks for sharing this excellent module; very useful for generating regexes to be used in apache 2.2 config from a collection of ip address ranges. It looks...

The following results in an infinite loop: ``` import range_regex range_regex.bounded_regex_for_range(-2, 50) ``` If negatives aren't supported, would at least be nice to throw an exception.

Hi, I just found out using the range-regex module in pyton is not working to generate regular expressions when dealing with timestamps. Let's say I want to generate a regex...

As depaoli pointed out, this should instruct users to call bounded_regex_for_range, not regex_for_range. That's all this pull request does.

Hello and thanks for this module, quite useful! I'm just noting that from range_regex import regex_for_range statement in the example from README.rst doesn't work, shouldn't it be from range_regex import...

minor changes for full python 2.6 compatibility

Such a test is desired: ``` python self.assertEqual(regex_for_range(100, 201), r'1\d{2}|20[0-1]')` ``` My suggestion is to remove some excessive stops inside while loops of split_to_ranges (new lines marked with