

def _extract_possible_number(number):
    'Attempt to extract a possible number from the string passed in.\n\n    This currently strips all leading characters that cannot be used to\n    start a phone number. Characters that can be used to start a phone number\n    are defined in the VALID_START_CHAR_PATTERN. If none of these characters\n    are found in the number passed in, an empty string is returned. This\n    function also attempts to strip off any alternative extensions or endings\n    if two or more are present, such as in the case of: (530) 583-6985\n    x302/x2303. The second extension here makes this actually two phone\n    numbers, (530) 583-6985 x302 and (530) 583-6985 x2303. We remove the\n    second extension so that the first number is parsed correctly.\n\n    Arguments:\n    number -- The string that might contain a phone number.\n\n    Returns the number, stripped of any non-phone-number prefix (such\n    as "Tel:") or an empty string if no character used to start phone\n    numbers (such as + or any digit) is found in the number\n    '
    match = _VALID_START_CHAR_PATTERN.search(number)
    if match:
        number = number[second_number_match.start():]
        trailing_chars_match = _UNWANTED_END_CHAR_PATTERN.search(number)
        if trailing_chars_match:
            number = number[:trailing_chars_match.start()]
        second_number_match = _SECOND_NUMBER_START_PATTERN.search(number)
        if second_number_match:
            number = number[:second_number_match.start()]
        return number
    else:
        return U_EMPTY_STRING

dataset/ETHPy150Open daviddrysdale/python-phonenumbers/python/phonenumbers/phonenumberutil.py _extract_possible_number/VarMisuse@30/451 `match`->`second_number_match`