import re


def extract_floats(string):
    """Extract all real numbers from the string into a list (used to parse the CMI gateway's cgi output)."""
    return [float(t) for t in re.findall(r'[-+]?[.]?[\d]+(?:,\d\d\d)*[\.]?\d*(?:[eE][-+]?\d+)?', string)]