# RegexReplace

### **Description**‌

The RegexReplace function performs a Regular Expression replace on the input string, returning the result.

### **Syntax**

‌The syntax for the RegexReplace function is:

`RegexReplace(input, pattern, replacement)`

#### ‌**Parameters**

input - the string to check.

pattern - the pattern to match.

replacement - the string to replace the values where there is a match.

### **Returns**

‌The RegexReplace function returns a string.&#x20;

### **Example**‌

Let's look at some RegexReplace function examples and explore how to use the RegexReplace  function.‌

```
RegexReplace("2hello1", "\d", "X")
Result: XhelloX

return RegexReplace("22hello1", "\d{2}", "X");
Result: Xhello1

return RegexReplace("2hello1", "\w{2}", "X");
Result: XXX1
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.novacuraflow.com/development/flowscript/functions/text-functions/regexreplace.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
