Explain how you would write a function to parse a string into a numeric format, keeping only specific characters.
Implement parse_numeric(text). Return the numeric value represented by the input: retain digits, at most one decimal point, and an optional minus sign before the first digit. Ignore all other characters. Return null when the input contains no digits. A leading decimal point is valid, and repeated decimal points or later minus signs must be ignored.
def parse_numeric(text):