# .NET MAUI Regex Mask

To validate the user input as a standard (alphanumeric) user input against a regular expression, use the `RegexMaskedEntry`, which provides errors if the regular expression (regex) rule is not matched. The resulting value is a string.

| **Regex**        | **Usage**                             |
| ---------------- | ------------------------------------- |
| `"[0-9]"`        | a single digit                        |
| `"[0-9]{1}"`     | a single digit (required)             |
| `"[a-zA-Z]"`     | a single letter                       |
| `"[a-zA-Z]{1}"`  | a single letter (required)            |
| `"\S"`           | all symbols without space             |
| `"."`            | all symbols                           |
| `"[0-9a-zA-Z]"`  | all without special symbols and space |
| `"[0-9a-zA-Z ]"` | all without special symbols           |

The following example demonstrates how to set the `RadRegexMaskedEntry`:

```XAML
<telerik:RadRegexMaskedEntry x:Name="regexMaskedEntry" Mask="^[a-z]$" Placeholder="^[a-z]$" AutomationId="regexMask"/>
```

The image below shows the end result.

![.NET MAUI RegexMaskedEntry](https://www.telerik.com/maui-ui/documentation/assets/80a0547f38603f3dfe9777031f0ba01b/maskedentry_regex.png)

> For the MaskedEntry Regex Mask examples, go to the [SDKBrowser Demo Application](https://www.telerik.com/maui-ui/documentation/demos-and-sample-apps/sdkbrowser-app) and navigate to MaskedEntry -> Mask Types category.

## See Also

* [Getting Started](https://www.telerik.com/maui-ui/documentation/controls/maskedentry/getting-started)
* [Validation](https://www.telerik.com/maui-ui/documentation/controls/maskedentry/validation)
* [Null Values Support](https://www.telerik.com/maui-ui/documentation/controls/maskedentry/value#null-value-support})
* [Events](https://www.telerik.com/maui-ui/documentation/controls/maskedentry/events)
* [Globalization](https://www.telerik.com/maui-ui/documentation/controls/maskedentry/globalization)
