Top
Systemwalker Runbook Automation Studio User's Guide
Systemwalker

6.4.7 Replace Filter

This filter finds the specified string in the results of an operation component or in filter output, and then replaces the string with another one.

Search

Enter the string to search and replace.

The input can be up to 512 characters long.

The filter will end in an error if the Search field is empty.

Use regular expressions

Select when regular expressions are to be used in the Search field.

The default is off.

Use case sensitivity

Select to distinguish between upper and lower case in searches.

The default is off.

Replace

Enter the string that will replace the string (or string matching the regular expression) in the Search field.

The input can be up to 512 characters long.

If the Replace field is empty, the string (or string matching the regular expression) in the Search field will be replaced by spaces.

Target

Select the target for replacement.

Select First matching string to replace only the first match. Select Last matching string to replace only the last match. Select All matching strings to replace all matches.

  • First matching string

  • Last matching string

  • All matching strings (Default)

Example 1:

Input:

Ethernet adapter1:
        IP Address. . . . . . . . . . . . : 192.168.238.1
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . :

Ethernet adapter2:
        IP Address. . . . . . . . . . . . : 192.168.187.102
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.187.1

Search:

192\.168\.\d+\.\d+

Use regular expressions:

On

Match case:

Off

Replace:

xxx.xxx.xxx.xxx

Target:

All matching strings

Output:

Ethernet adapter1:
        IP Address. . . . . . . . . . . . : xxx.xxx.xxx.xxx
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . :

Ethernet adapter2:
        IP Address. . . . . . . . . . . . : xxx.xxx.xxx.xxx
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : xxx.xxx.xxx.xxx