Description | The |
Syntax | REPLACE( |
Output | text |
Variables
text
: The input text string in which you want to perform replacements.search
: The text you want to find and replace.replace
: The text with which you want to replace the found search string.
The REPLACE()
function is case-sensitive, meaning it will only replace text that exactly matches the specified search string in terms of both character sequence and letter case. If you need case-insensitive replacement, you may consider using REGEX_REPLACE()
to achieve the desired result.
Example
REPLACE(`Text`,"SALE","DISCOUNT")
ID | Text | REPLACE |
1 | Huge SALE on electronics today! | Huge DISCOUNT on electronics today! |
2 | Special SALE: Save 20% on select items. | Special DISCOUNT: Save 20% on select items. |
3 | No SALE available for this product. SALE | No DISCOUNT available for this product. DISCOUNT |