# ReplaceRegexp

Finds the specified regular expression pattern and replaces it with the new text

```mathematica
ReplaceRegexp("price 100 EUR", "EUR|GBP", "USD") → "price 100 USD"
ReplaceRegexp("1999", "[9]", "0") → "1000"
```

#### Inputs

`ReplaceRegexp(string, searchRegexp, replaceWith, [isCaseSensitive], [allMatches])`

* `string` - A text value to search in
* `searchRegexp` - Regular expression to search for
* `replaceWith` - Text to replace with
* `[isCaseSensitive]` - **\[optional**: `true` by default\*\*]\*\* - Set `false` if search should be case **insensitive**
* `[allMatches]` - **\[optional**: `true` by default\*\*]\*\* - Set `false` if only the first match should be replaced


---

# 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://docs.tomat.ai/data-transformation/formulas/string-functions/replaceregexp.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.
