# 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2Fgqh6CCg9m8C9JuHrRKtK%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 =* A\@B!C$D\*

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FaGwoy7XBMLYfzPCpn4kO%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, having replaced all special characters with a space.

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