Searches for all occurrences of the search pattern and replaces them with the specified
string.
This method does not change the original string, it returns a modified version of it.
For more complex replacements you can use Match / NextMatch methods (see the
example on the Overview page).
Syntax: Replace (String As String, Replacement As String) As String
String - The original string.
Replacement - The string that will replace each match.
Example:
Regex1.New1("gr[ae]y")
s = "This is a gray table and this is a grey chair."
s = Regex1.Replace(s,"gray")
Msgbox(s)