class in Unity.SmartStrings.Extensions
/
Inherits from:Unity.SmartStrings.Core.Extensions.FormatterBase
Implements interfaces:IFormatterLiteralExtractor, IInitializer
Formats values by matching them against a regular expression, and can output matching group values.
Syntax:
{value:ismatch(regex): format | default}
Or in context of a list:
{myList:list:{:ismatch(^regex$):{:format}|'no match'}|, | and }
Or with output of the first matching group value:
{value:ismatch(regex):First match in '{}'
: {m[1]}|No match}
| Property | Description |
|---|---|
| PlaceholderNameForMatches | The name of the placeholder used to output RegEx matching group values. Example: {value:ismatch(regex):First match in '{}': {m[1]}|No match} "m" is the PlaceholderNameForMatches |
| RegexOptions | The IsMatchFormatter.RegexOptions for the Text.RegularExpressions.Regex expression. |
| SplitChar | The character used to split the option text literals. Valid characters are: | (pipe) , (comma) ~ (tilde) |
| Property | Description |
|---|---|
| DefaultName | Default name to use when FormatterBase.Name is null. |