# ReplaceAllSpecialCharsWithSpace

| **Name**    | ***ReplaceAllSpecialCharWithSpace***                        |
| ----------- | ----------------------------------------------------------- |
| Syntax      | ReplaceAllSpecialCharWithSpace (String str)                 |
| Purpose     | To replace all special characters in a string with a space. |
| Description | Places Space on index of Special Characters in a string.    |
| Return Type | String                                                      |
| Parameters  | Str \[System.String] – The Input string                     |

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

**Example**

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

Where,

*str =* A\@B!C$D\*

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

Right-click on the function transformation object and select *Preview Output.* You can see that Astera Data Stack has returned a string, having replaced all special characters with a space.

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