I got a bit rusty with powershell, and I am missing the correct search terms, so I hoping asking here is ok.
I have list of URL of the following structure:
/pub/pdf/ssm.supervisorymanual.en.pdf?42da4200dd38971a82c2d
/pub/pdf/ssm.supervisorymanual.de.pdf?42da4200dd38971a82c2d
...
Using powershell’s {$_.replace("x","y")}
within a pipe, I want to delete the trailing hash, so that I end up with
/pub/pdf/ssm.supervisorymanual.en.pdf
/pub/pdf/ssm.supervisorymanual.de.pdf
...
As RegEx, the x
would be e.g. of the form ?(0-9a-z)*$
and y
would be an empty string, but that does not work.