def numeric_part(s):
m = re_numeric_part.match(s)<EOL>if m:<EOL><INDENT>return int(m.group(<NUM_LIT:1>))<EOL><DEDENT>return None<EOL>
Returns the leading numeric part of a string.

    >>> numeric_part("20-alpha")
    20
    >>> numeric_part("foo")
    >>> numeric_part("16b")
    16