GGlobHaven
Product

Product features · Bounded wildcard matching

01

GlobHaven supports review of whole-string wildcard decisions, separating the two supported tokens from bracket syntax and other pattern languages.

01

Connection

Base URL, credentials and a reachable server.

02

Selection

A model available through the configured endpoint.

03

Capabilities

Context limits and tool support are determined by the model and server.

Bounded wildcard matching

● ● ●GlobHaven●
A concrete starting point · Bounded wildcard matching ×
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]
✳Match a whole string with question-mark and star wildcards using at most 256 Unicode code points per input.
✓ ChangesReview before applying ↗
Illustrative workspace
AI coding workspace

Your next change starts here.

Get the Windows app ↗