

def _parse_prefix_as_idd(idd_pattern, number):
    'Strips the IDD from the start of the number if present.\n\n    Helper function used by _maybe_strip_i18n_prefix_and_normalize().\n\n    Returns a 2-tuple:\n      - Boolean indicating if IDD was stripped\n      - Number with IDD stripped\n    '
    match = idd_pattern.match(number)
    if match:
        match_end = match.end()
        digit_match = _CAPTURING_DIGIT_PATTERN.search(number[match_end:])
        if digit_match:
            normalized_group = normalize_digits_only(match.group(1))
            if (normalized_group == U_ZERO):
                return (False, number)
        return (True, number[match_end:])
    return (False, number)

dataset/ETHPy150Open daviddrysdale/python-phonenumbers/python/phonenumbers/phonenumberutil.py _parse_prefix_as_idd/VarMisuse@58/184 `digit_match`->`match`