SETREPLACE - Replace a substring with another substring |
Top Previous Next |
This script command scans the [ source ] string and replaces all instances of the [ old substring ] with [ new substring ] and saves the result in [ variable ].
Consider the following example.
SET string = "This is a string." SETREPLACE mine = string " a " " my "
The resulting mine variable contains the value "This is my string.". The original string variable is unchanged.
Related command(s): SETLEFT, SETMID, SETRIGHT, SETLEN, SETEXTRACT, SETSUBSTR, SET |