skip to Main Content

Powershell Replace – Special characters – Nginx

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:nginxconfnginx.conf' | ForEach { (Get-Content $_) | ForEach {$_ -Replace…

VIEW QUESTION

Remove last dots from characters in jquery

How to remove only the last dots in characters in jquery? Example: 1.. 1.2. Expected result: 1 1.2 My code: var maskedNumber = $(this).find('input.CategoryData'); var maskedNumberValue = $(maskedNumber).val().replace(/[^0-9.]/g, '').replace('.', 'x').replace('x', '.').replace(/[^d.-]/g, ''); console.log(maskedNumberValue.slice(0, -1)) How do I solve this problem?…

VIEW QUESTION
Back To Top
Search