I need to replace
location ~* "^/(888888-localhost\/client)(.*)$" {
            proxy_pass https://localhost:32583;
by
location ~* "^/(888888-localhost\/client)(.*)$" {
            proxy_pass https://localhost:$proxy;
I'm trying to achieve this with the following code with no success
Get-ChildItem 'C:\nginx\conf\nginx.conf' | ForEach {
     (Get-Content $_) | ForEach  {$_ -Replace "location ~\* \""^/\(888888-localhost\\/client\)(.*)$"" {
            proxy_pass https://localhost:.+;", "location ~* ""^/(888888-localhost\/client)(.*)$" {
                proxy_pass https://localhost:$proxy;""} | Set-Content $_
}
How can i do this using Powershell?
 
     
     
    