# IsUSPhone

IsUSPhone (String str)

| **Name**    | ***IsUSPhone***                                                                                                                                                                               |
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Syntax      | IsUSPhone (String str)                                                                                                                                                                        |
| Purpose     | To return true if the number represents a valid US phone number.                                                                                                                              |
| Description | Checks whether a given value represents a valid United States phone number. This method tests format and digits to determine whether the given string is potentially a valid US phone number. |
| Return Type | Boolean                                                                                                                                                                                       |
| Parameter   | str \[System.String] – Value to be checked.                                                                                                                                                   |

![](/files/rGcmTOqOWeHqeyyY4Acf)

**Example**

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

Where,

*str* = (123) 456-7890

![](/files/tEtp0HAjqFoSgZjnar3G)

In the output window, you can see that Astera has returned “True”, as the specified string matches a valid US phone format.

![](/files/UVB9X1748vq7aWPTV7Bh)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.astera.com/astera-data-stack-v10/functions/regular-expressions/isusphone.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
