# REPLACE

The `REPLACE` function substitutes any match of a regular expression in a string with a specified replacement string.

## Syntax

`REPLACE(string, regex, newString)`

### Parameters

#### `string`

String expression.

#### `regex`

Regular expression.

#### `newString`

Replacement string.

## Examples

The following example replaces any occurrence of the word "World" with the word "Universe":

```esql
ROW str = "Hello World"
| EVAL str = REPLACE(str, "World", "Universe")
| KEEP str
```

Another example could be replacing digits in a string with a specific character:

```esql
ROW str = "User123"
| EVAL str = REPLACE(str, "\\d", "*")
| KEEP str
```
