replaceAll()
Table of Contents
Overview
The replaceAll() function takes string , searchString , and replacementString as arguments. It replaces all occurrences of searchString with replacementString in the string, and returns the string.
If searchString is not present in the string, it will return the string as it is.
Note: This function performs a case-sensitive search.
Return Type
- Text
Syntax
(OR)
Parameter | Description | Data type |
---|---|---|
<variable> | Variable which will contain the returned string. | TEXT |
<string> | TEXT | |
<searchString> |
| TEXT |
<replacementString> |
| TEXT |
<boolean> |
By default, the replaceAll() function supports regular expression (i.e) it will not find and replace the special characters like $ in the source string. This parameter can be used to specify if the regular expression is to be supported or escaped.
| BOOLEAN |
Examples
newText = replaceAll(mainString, "online", "custom");
// returns "Create custom database applications"