# 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://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/1Bsyn5g9oxSUnv3iowRE/0.png)

**Example**

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

Where,

*str* = A123Bc4de5678f9g10

![](https://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/6Far2Q5EzfToFX2fkZ55/1.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://content.gitbook.com/content/zEifS4h8yurLAAwiGNX2/blobs/EzENJlMlxHNf5Yr6H7iX/2.png)
