I am attempting to use the rreplace function to remove text in the title contained in parenthesis, including the parenthesis. On regex101.com if I use the regex expression \s*\(.*?\) it finds the space before, both parenthesis and all the text contained within. When I try to use this in rreplace it removes all of the text in the title. The code is contained in a foreach loop as follows:
You are right. I was not escaping all of the special characters and therefore $rreplace failed. I ran a test this afternoon in a blank script as follows and it works.