import re


def pattern_match(item : str, pattern : str, strict : bool = True) -> bool:
    """
    Check if item matches with the pattern that contains 
    "*" wildcards and "?" question marks.

    Args:
        item:
            The string that pattern will be applied to.
        pattern:
            A wildcard (glob) pattern.
        strict:
            If `True`, then it will check if matched string equals with the `item` parameter.
            So applying "foo?" pattern on "foobar" will result in `False`. Default is `True`.
    
    Returns:
        A boolean value.
    """
    _ptn = pattern.replace(".", "\.").replace("+", "\+").replace("*", ".+").replace("?", ".")
    _match = re.match(_ptn, item)
    if strict and bool(_match):
        return _match.group(0) == item
    return bool(_match)