Tell me how you would write a function that extracts numbers from a string like "abc12e4" and returns the expected sum output of 15.
Interpret a number as a maximal contiguous sequence of digits and return the sum of all such numbers. Under this standard interpretation, "abc12e4" produces 16, not 15, so clarify the inconsistency before implementing. The function should accept one string and return an integer.
def sum_numbers(text):