# GetDigits (String)

| **Name**    | ***GetDigits***                                                                  |
| ----------- | -------------------------------------------------------------------------------- |
| Syntax      | GetDigits (String str)                                                           |
| Purpose     | To return a string containing all numeric characters in the specified str value. |
| Description | Removes all occurrences of non-numeric characters and returns all digits in str. |
| Return Type | String                                                                           |
| Parameters  | str \[System.String] – String to remove non-numeric characters from              |

![](https://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/0%20\(62\).png)

**Example**

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

Where,

*str* = A123Bc4de5678f9g10

![](https://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/1%20\(63\).png)

Right-click on the function transformation object and select *Preview Output.* You can see that Astera Data Stack has returned a string containing only numeric values from the specified *str* value.

![](https://github.com/astera-software/Astera_Data_Stack_v9/blob/main/.gitbook/assets/2%20\(63\).png)
