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

**Example**

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

Where,

*str* = A123Bc4de5678f9g10

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

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