import re


def get_info_float(lines, rege):
    """Get the infromation form contents based on the regular expression."""

    cp = re.compile(rege)
    energy = 1000
    for line in lines:
        match = cp.search(line)
        if match:
            energy = float(match.group(1))
    return energy