Skip to main content

Regex

A regular expression pattern with optional matching flags.

Notes

Defines a regular expression and its associated matching behavior through a set of optional flags. Flags control aspects such as case sensitivity, multiline matching, dot-all mode, Unicode handling, and comment support, providing fine-grained control over how patterns are applied to text.

Usage

canonEq: false
comments: false
dotAll: false
ignoreCase: false
ignoreDiacritic: false
literal: false
matchEmpty: false
multiline: false
pattern: string
trim: false
unicodeCase: false
unicodeCharacterClass: false
unixLines: false

Properties

PropertyTypeRequiredDefault
canonEqbooleanNofalse
commentsbooleanNofalse
dotAllbooleanNofalse
ignoreCasebooleanNofalse
ignoreDiacriticbooleanNofalse
literalbooleanNofalse
matchEmptybooleanNofalse
multilinebooleanNofalse
patternstringNo-
trimbooleanNofalse
unicodeCasebooleanNofalse
unicodeCharacterClassbooleanNofalse
unixLinesbooleanNofalse

Property Details

canonEq

When enabled, two characters are considered to match if and only if their full canonical decompositions match (corresponds to Java's Pattern.CANON_EQ flag).

comments

When enabled, whitespace and comments starting with # are ignored in the pattern, making it easier to write well-documented regular expressions (corresponds to Java's Pattern.COMMENTS flag).

dotAll

When enabled, the . character matches any character including line terminators (corresponds to Java's Pattern.DOTALL flag).

ignoreCase

When enabled, matching is performed without regard to character case.

ignoreDiacritic

When enabled, diacritical marks (e.g., accents) are ignored when performing matching or replacing.

literal

When enabled, the pattern is treated as a literal string and all metacharacters or escape sequences lose their special meaning (corresponds to Java's Pattern.LITERAL flag).

matchEmpty

When enabled, null or empty strings are considered a positive match regardless of the pattern. To also treat blank (whitespace-only) values as matches, enable trim as well.

multiline

When enabled, ^ and $ match the beginning and end of each line rather than the entire input (corresponds to Java's Pattern.MULTILINE flag).

pattern

The text or expression used for matching, whose interpretation depends on the selected method.

trim

When enabled, leading and trailing whitespace is removed from the field value before processing.

unicodeCase

When enabled in combination with ignoreCase, Unicode-aware case folding is applied during case-insensitive matching (corresponds to Java's Pattern.UNICODE_CASE flag).

unicodeCharacterClass

When enabled, predefined character classes and POSIX character classes conform to the Unicode Standard (corresponds to Java's Pattern.UNICODE_CHARACTER_CLASS flag).

unixLines

When enabled, only the \n character is recognized as a line terminator for the ., ^, and $ operators (corresponds to Java's Pattern.UNIX_LINES flag).