# UxmlValueMatches

> Restricts the value of an attribute to match a regular expression.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine.UIElements](/engine/6000.7/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule
* **Inherits from:** [UxmlTypeRestriction](/engine/6000.7/script-reference/unityengine/uielements/uxmltyperestriction.md)
* **Implements:** [IEquatable\<UxmlTypeRestriction>](https://learn.microsoft.com/dotnet/api/system.iequatable-1)

```csharp
public class UxmlValueMatches : UxmlTypeRestriction, IEquatable<UxmlTypeRestriction>
```

## Properties

| Property                                                                                  | Description                                                 |
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
| [regex](/engine/6000.7/script-reference/unityengine/uielements/uxmlvaluematches/regex.md) | The regular expression that should be matched by the value. |

## Methods

| Method                                                                                      | Description                                                                                                                                                                      |
| ------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Equals](/engine/6000.7/script-reference/unityengine/uielements/uxmlvaluematches/equals.md) | Indicates whether the current [UxmlValueMatches](/engine/6000.7/script-reference/unityengine/uielements/uxmlvaluematches.md) object is equal to another object of the same type. |
