# ReplaceRegex

## Overview

![The ReplaceRegex Node.](https://926825830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKQhJdUBr7YQzfIwmpAZ9%2Fuploads%2Fgit-blob-d6fe7a701cdc38145af2fd4b532a52dce483482f%2Freplaceregexnode.png?alt=media)

The **ReplaceRegex** **Node** allows the user to replace parts of a **String** using regular expressions to search for the pattern to replace.

[**Scope**](https://docs.incari.com/incari-studio/2022.1/overview#scopes): **Project**, **Scene**, **Function**, **Prefab**.

## Attributes

![The ReplaceRegex Node Attributes.](https://926825830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKQhJdUBr7YQzfIwmpAZ9%2Fuploads%2Fgit-blob-73f1627b93a3cea70dfb3a0f46e29919bb08a457%2Freplaceregexattributes.png?alt=media)

### Inputs

| Attribute | Type       | Description                                                                                                             |
| --------- | ---------- | ----------------------------------------------------------------------------------------------------------------------- |
| `String`  | **String** | **String** in which some parts will be replaced, if none is given in the **Input Socket**.                              |
| `From`    | **String** | The pattern that will be searched for and replaced using regular expressions, if none is given in the **Input Socket**. |
| `To`      | **String** | **String** that will replace the pattern defined in `From`, if none is given in the **Input Socket**.                   |

## Inputs

| Input             | Type       | Description                                                                   |
| ----------------- | ---------- | ----------------------------------------------------------------------------- |
| *Pulse Input* (►) | **Pulse**  | A standard **Input Pulse**, to trigger the execution of the **Node**.         |
| `String`          | **String** | **String** in which some parts will be replaced.                              |
| `From`            | **String** | The pattern that will be searched for and replaced using regular expressions. |
| `To`              | **String** | **String** that will replace the pattern defined in `From`.                   |

## Outputs

| Output             | Type       | Description                                                                                                                            |
| ------------------ | ---------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| *Pulse Output* (►) | **Pulse**  | A standard **Output Pulse**, to move onto the next **Node** along the **Logic Branch**, once this **Node** has finished its execution. |
| `Result`           | **String** | The resulting **String** after the pattern has been replaced.                                                                          |

## See Also

* [**Replace**](https://docs.incari.com/incari-studio/2022.1/toolbox/string/replace)
* [**MatchRegex**](https://docs.incari.com/incari-studio/2022.1/toolbox/string/match-regex)

## External Links

* [*Regular expression*](https://en.wikipedia.org/wiki/Regular_expression) on Wikipedia.
