# IsMatchRegEx

| **Name**    | ***IsMatchRegEx***                                                                                                              |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------- |
| Syntax      | IsMatchRegEx (String pattern, String str)                                                                                       |
| Purpose     | To return true if the regular expression found a match in the string. Otherwise, returns false.                                 |
| Description | Indicates whether the regular expression finds a match in a specified string value by returning a boolean value.                |
| Return Type | Boolean                                                                                                                         |
| Parameters  | <p>pattern \[System.String] – Regular expression pattern to match</p><p>str \[System.String] – String to search for a match</p> |

<figure><img src="https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/4WycNsaQvFeNDdS0SrrM/0.png" alt=""><figcaption></figcaption></figure>

**Example**

In this example, we will pass the required parameters to the function transformation object using a *Variables* object.

Where,

*Pattern* = {x,y}

*String* = A,2

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/iWq2xj2jI2EeWKiYvAMU/1.png)

In the output window, you can see that Astera has returned “False”, as the specified string does not match the specified pattern value.

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/D27ok2PoUhoDKyEViydS/2.png)
