Hello. What does “not working” mean exactly? Also, you show a string and then a replace snippet, but you don’t show how you used those together. Please edit your post to demonstrate clearly what you execute, what happens (or doesn’t happen), and what you expect in the end.
Which is not valid powershell code. You should copy and paste your actual code (removing any private information) into a preformatted text block (hit the </> icon and paste your code)
There are a number of ways you could be attempting to replace the text. Without showing what you’re actually executing, you may at best get a blind recommendation based on assumptions like the following.
Assuming you have the “string” in a variable, the following should work. Note that the (?m) modifier treats the input as a string array so the match and replace will be compared to each line individually. What I believe you really want is (?s) which treats the input as a single string.