Connection
Base URL, credentials and a reachable server.
GlobHaven supports review of whole-string wildcard decisions, separating the two supported tokens from bracket syntax and other pattern languages.
Base URL, credentials and a reachable server.
A model available through the configured endpoint.
Context limits and tool support are determined by the model and server.
def wildcard(text, pattern):
if not isinstance(text, str) or not isinstance(pattern, str):
raise ValueError("text.required")
if len(text) > 256 or len(pattern) > 256:
raise ValueError("length.cap")
if any(ord(c) in (91, 93, 92) for c in pattern):
raise ValueError("syntax.unsupported")
previous = [True] + [False] * len(pattern)
for j, token in enumerate(pattern, 1):
previous[j] = token == "*" and previous[j - 1]
for char in text:
current = [False] * (len(pattern) + 1)
for j, token in enumerate(pattern, 1):
current[j] = (current[j - 1] or previous[j]) if token == "*" else (
previous[j - 1] and (token == "?" or token == char))
previous = current
return previous[-1]