import re


def extract_minihead_bool_param(miniHead, name):
    """Extract a bool parameter from the serialized text of the ICE MiniHeader"""
    # Note: if missing, return false (following ICE logic)
    expr = r'(?<=<ParamBool."' + name + r'">{)\s*[^}]*\s*'
    res = re.search(expr, miniHead)

    if res is None:
        return False
    else:
        if res.group(0).strip().lower() == '"true"'.lower():
            return True
        else:
            return False