# IsMatchFormatter

> Formats values by matching them against a regular expression, and can output matching group values.

## Definition

* **Type:** Class
* **Namespace:** [Unity.SmartStrings.Extensions](/engine/6000.7/script-reference/unity/smartstrings/extensions.md)
* **Assembly:** UnityEngine.SmartStringsModule
* **Inherits from:** [FormatterBase](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/formatterbase.md)
* **Implements:** [IFormatter](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformatter.md), [IInitializer](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iinitializer.md), [IFormatterLiteralExtractor](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/iformatterliteralextractor.md)

```csharp
public class IsMatchFormatter : FormatterBase, IFormatter, IInitializer, IFormatterLiteralExtractor
```

## Remarks

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}

## Properties

| Property                                                                                                                                 | Description                                                                                                                                                   |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [PlaceholderNameForMatches](/engine/6000.7/script-reference/unity/smartstrings/extensions/ismatchformatter/placeholdernameformatches.md) | The name of the placeholder used to output RegEx matching group values.                                                                                       |
| [RegexOptions](/engine/6000.7/script-reference/unity/smartstrings/extensions/ismatchformatter/regexoptions.md)                           | The [IsMatchFormatter.RegexOptions](/engine/6000.7/script-reference/unity/smartstrings/extensions/ismatchformatter/regexoptions.md) for the Regex expression. |
| [SplitChar](/engine/6000.7/script-reference/unity/smartstrings/extensions/ismatchformatter/splitchar.md)                                 | The character used to split the option text literals. Valid characters are: \| (pipe) , (comma)  \~ (tilde)                                                   |

## Inheritance

**Inherited Members:**

* [FormatterBase.DefaultName()](/engine/6000.7/script-reference/unity/smartstrings/core/extensions/formatterbase/defaultname.md)
