Read-ReplaceString

Searches for a specified substring in a string and exchanges all occurrences of this substring for the specified substring. The command does not support wildcards.


Settings:

  • String
    Character string in which characters are to be replaced.
  • Search for
    Substring to be searched for.
  • Replace with
    The substring found is replaced by this string.
  • Store result in
    Name of the variable in which the read out substring is to be stored. Specify only the name of the variable, not the $ sign and the curly brackets.


Example:

The following example turns the spell Abracadabra into Animcadanim by replacing the substring bra with nim, which is then stored in the variable _Result:


Corresponds to DSM eScript command:

  • StrReplace


See also: