def numeric_part(s):
 m = re_numeric_part.match(s)
 if m:
  return int(m.group(1))
 return None

def numeric_part ( s ) : m = re_numeric_part . match ( s ) if m : return int ( m . group ( 1 ) ) return None
returns the leading numeric part of a string .