def _expand_number_regex(self, value):
        """
        We want to turn something like /hp-node{31-40}.phx1 into
            '/hp-node(31|32|33|34|35|36|37|38|39|40).phx1'
        """
        matches = self.num_match.findall(value)
        for low, high in matches:
            padding = min(len(low), len(high))
            if int(low) >= int(high):
                continue
            new_value = ""
            for i in xrange(int(low), int(high) + 1):
                new_value += "{0}|".format(str(i).rjust(padding, '0'))
            new_value = '(' + new_value.strip('|') + ')'
            value = value.replace('{{{0}-{1}}}'.format(low, high), new_value)
        return value
dataset/ETHPy150Open rtucker-mozilla/mozilla_inventory/core/search/compiler/invfilter.py/REFilter._expand_number_regex/original