Package dev.metaschema.core.metapath.function.regex


package dev.metaschema.core.metapath.function.regex
Provides regular expression support for implementing Metapath functions.

This package contains utilities for processing regular expressions in accordance with the XPath 3.1 specification. It handles the translation of XPath-style regex flags to Java Pattern flags and provides error handling for invalid regular expressions.

Key Classes

XPath Regex Flags

The package supports XPath 3.1 regex flags as defined in the specification:

  • s - Dot-all mode (. matches newlines)
  • m - Multiline mode (^ and $ match line boundaries)
  • i - Case-insensitive matching
  • x - Comments mode (whitespace and comments ignored)
  • q - Literal mode (metacharacters treated as ordinary characters)

Usage

This package is used internally by Metapath functions that perform pattern matching, such as fn:matches, fn:replace, and fn:tokenize.

See Also: