> For the complete documentation index, see [llms.txt](https://v5docs.keyfax.biz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v5docs.keyfax.biz/reference/expression-reference/text-expressions/replace.md).

# Replace

Returns the databox value with every occurrence of one piece of text swapped for another.

| Expression                                  | Databox value       | Result                   |
| ------------------------------------------- | ------------------- | ------------------------ |
| `Replace('B','b')`                          | `The Big Brown fox` | `The big brown fox`      |
| `Replace('NOTE:','!!! IMPORTANT NOTE !!!')` | `NOTE:`             | `!!! IMPORTANT NOTE !!!` |

Every occurrence is replaced, not just the first, and the match is case sensitive.

Replacing a separator with a line break is a common use — see [Chr and line breaks](/reference/expression-reference/text-expressions/chr-and-line-breaks.md).
