code: def extract_numeric_values_from_string(str_contains_values):
          # type: (AnyStr) -> Optional[List[Union[int, float]]]
          
          numeric_const_pattern = r'[-+]?(?:(?:\d*\.\d+)|(?:\d+\.?))(?:[Ee][+-]?\d+)?'
          rx = re.compile(numeric_const_pattern, re.VERBOSE)
          value_strs = rx.findall(str_contains_values)
          if len(value_strs) == 0:
              return None
          else:
              return [int(float(v)) if float(v) % 1. == 0 else float(v) for v in value_strs]
docs: Find numeric values from string, e.g., 1, .7, 1.2, 4e2, 3e-3, -9, etc.
          
          Reference: `how-to-extract-a-floating-number-from-a-string-in-python`_
  
          Examples:
              >>> input_str = '.1 .12 9.1 98.1 1. 12. 1 12'
              >>> StringClass.extract_numeric_values_from_string(input_str)
              [0.1, 0.12, 9.1, 98.1, 1, 12, 1, 12]
              >>> input_str = '-1 +1 2e9 +2E+09 -2e-9'
              >>> StringClass.extract_numeric_values_from_string(input_str)
              [-1, 1, 2000000000, 2000000000, -2e-09]
              >>> input_str = 'current level: -2.03e+2db'
              >>> StringClass.extract_numeric_values_from_string(input_str)
              [-203]
  
          Args:
              str_contains_values: string which may contains numeric values
  
          Returns:
              list of numeric values
  
          .. _how-to-extract-a-floating-number-from-a-string-in-python:
              https://stackoverflow.com/questions/4703390/how-to-extract-a-floating-number-from-a-string-in-python/4703508#4703508