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β
- YAML
- JSON
- XML
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
{
"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
}
<regex>
<canonEq>false</canonEq>
<comments>false</comments>
<dotAll>false</dotAll>
<ignoreCase>false</ignoreCase>
<ignoreDiacritic>false</ignoreDiacritic>
<literal>false</literal>
<matchEmpty>false</matchEmpty>
<multiline>false</multiline>
<pattern>string</pattern>
<trim>false</trim>
<unicodeCase>false</unicodeCase>
<unicodeCharacterClass>false</unicodeCharacterClass>
<unixLines>false</unixLines>
</regex>
Propertiesβ
| Property | Type | Required | Default |
|---|---|---|---|
canonEq | boolean | No | false |
comments | boolean | No | false |
dotAll | boolean | No | false |
ignoreCase | boolean | No | false |
ignoreDiacritic | boolean | No | false |
literal | boolean | No | false |
matchEmpty | boolean | No | false |
multiline | boolean | No | false |
pattern | string | No | - |
trim | boolean | No | false |
unicodeCase | boolean | No | false |
unicodeCharacterClass | boolean | No | false |
unixLines | boolean | No | false |
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).