replaceAll

Replaces each substring that matches the given regular expression with the specified replacement.

Note: The replaceAll string method is case sensitive.

Syntax:

$[ScriptVariable]::replaceAll(String regex, String replacement)

Parameters:

Example:

The following example illustrates the syntax for the replaceAll string method:

$str = "AAA"

$str::replaceAll("[A]", "B")

print($str)

Output:

BBB