See also
Find, REFind, ReplaceNoCase, ReplaceList, REReplace
Parameters
Parameter
|
Description
|
---|
string
|
A string or a variable that contains one. String in which to search.
|
substring1
|
A string or a variable that contains one. String for which to search
|
obj
|
String that replaces substring1 or callback function.
|
scope
|
- one: replaces the first occurrence (default)
- all: replaces all occurrences
|
Usage
To remove a string, specify the empty string ("") as substring2.You do not need to escape comma characters in strings. For example, the following code deletes the commas from the sentence:
replace("The quick brown fox jumped over the lazy cow, dog, and cat.",",","","All")
|
Example