def get_region(reg_str):
    """Transform a string of the form X-Y into a region"""
    spl = reg_str.split('-')
    if spl[0] == '' and spl[1] == '':
        # Fully open region
        reg = [0, float('inf')]
    elif spl[0] == '':
        # Open beginning
        reg = [0, int(spl[1])]
    elif spl[1] == '':
        # open end
        reg = [int(spl[0]), float('inf')]
    else:
        reg = [int(spl[0]), int(spl[1])]

    return reg