def escape(pattern: str) -> str:
    """Escape the given pattern to match pure text instead of regexp"""
    escaped = []
    for char in pattern:
        if char in {"*", "\\", "|", "ε", "?", "(", ")", "Σ", "."}:
            escaped.append("\\")
        escaped.append(char)
    return "".join(escaped)