import re


def has_post_in_id(tag):
    """Check whether id attribute of html tag contains "post"."""
    if not tag.has_attr("id"):
        return False
    return bool(re.compile(r"^post-\d+$").search(tag["id"]))