Global regex replacer

[string/Global regex replacer]

Replaces all occurrences of regex in string with new. Example:

  1. regex is set to (\w+)\s(\w+)"

  2. new is set to "$2, $1"

  3. "Jane Smith"@0 received via string

  4. replaced sends "Smith, Jane"@0

Keywords: replace, string, search, regex, regular expression

Input ports

  • string: string

    Receives the string to be replaced. Example: "dog cat rain Dog"

  • regex: string

    Receives regular expression to test the specified string against. Example: "[Dd]og"

  • new: string

    Receives the replacement string. In the replacement you can use backreference. More: Example: "cat"

Output ports

  • replaced: string

    Sends the replaced string. Example: "cat cat rain cat"

Last updated