def _extract_possible_number(number):
 match = _VALID_START_CHAR_PATTERN.search(number)
 if match:
  number = 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

def _extract_possible_number ( number ) : match = _VALID_START_CHAR_PATTERN . search ( number ) if match : number = 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
attempt to extract a possible number from the string passed in .