Choose where you’d like to start



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


<variable> = <string>.replaceAll( <searchString>, <replacementString>, <boolean> );


<variable> = replaceAll( <string>, <searchString>, <replacementString>, <boolean> );
ParameterDescriptionData type
<variable>Variable which will contain the returned string.TEXT
<string> The string in which all occurrences of searchString will be replaced with replacementString.TEXT

All occurrences of this searchString will be replaced with replacementString, in the string.


This replacementString will replace all occurrences of searchString in the string.


Applicable values: true or false.

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.

  • The value true denotes escaping the regular expression.
  • The value false denotes supporting the regular expression. By default, the value is taken as "false".


mainString="Create online database applications";
newText = replaceAll(mainString, "online", "custom");             
// returns "Create custom database applications"

Get Started Now