Module dev.metaschema.core
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
RegexUtil- Utility methods for parsing XPath regex flags and creating Java Pattern objectsRegularExpressionMetapathException- Exception thrown when regular expression processing fails
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 matchingx- 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.
-
ClassDescriptionUtility methods for regular expression processing in Metapath functions.MPRX: Exceptions related to regular expression processing in Metapath functions.