package mcp-kit

  1. Overview
  2. Docs

Module Jsonschema_core.RegexSource

Regex engine abstraction.

Wraps ECMAScript regular-expression semantics behind a module boundary. JSON Schema patterns are compiled with explicit ECMAScript Unicode-mode behavior and are not implicitly anchored.

Sourcetype t

A compiled regular expression.

Sourceval compile : string -> (t, string) result

Compile a regex pattern string. Returns Error if the pattern is invalid. JSON Schema regexes are NOT implicitly anchored.

Sourceval matches : t -> string -> bool

Test whether the regex matches anywhere in the string. Per JSON Schema spec, patterns are NOT anchored.