from typing import List
import re


def excluded_pattern(root: str, excludes: List[str]) -> bool:
    """
    Check if the given path or filename matches any of the provided
    exclude patterns.
    """
    for pattern in excludes:
        if re.search(pattern, root):
            return True
    return False