# 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FhCrGipOegcHOIX5njlFl%2F0.png?alt=media" 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FS5SirCubpn5dgTX6Qp0c%2F1.png?alt=media)

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

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FvTxVZTifA9jW9On5QZL7%2F2.png?alt=media)
