---
schema_version: "1"
id: 5aa9576b69b04c08bcbff074af8b570f99f7b92164555c91e550419c24dccdc6
title: replace()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_saql/guides/reference/bi-saql-functions-string-replace.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-string-replace.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: e4cf25afc2d4dca50b6eaf907bffbea5d918c40832367344e5a95025e8bd953c
products:
  - Analytics SAQL Developer Guide
  - analytics
---

# replace()

Replaces a substring with the specified characters.

## Syntax

`replace`(_string, searchStr, replaceStr_)

## Usage

This function replaces _searchStr_ with _replaceStr_, then returns the modified string. If any of the parameters are `null`, then the function returns `null`. If _searchStr_ is an empty string, the function returns `null`. This function is case-sensitive.

## Example

```nolang
replace("Watson, come quickly.", "quickly", "slowly") == "Watson, come slowly."
replace("Watson, come quickly.", "o", "a") == "Watsan, came quickly."
replace("Watson, come quickly.", "", "Mr.") == null
```
