Manipulating a string


hello,

say have string-variable this:

$a = "\\some\\kind\\of\\text\\here\\seperated"

what easiest way reverse , change delimiters .'s insted. result be

$b = "seperated.here.text.of.kind.some"


anyone has ideas?

maybe not easiest:

$split=$a.split("\\")
for($i=$split.count+1;$i -ge 0;$i-=2){[string]$b+=($split[$i]+".")}
$b.substring(1,$b.length-3)



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

CRL Revocation always failed

Failed to query the results of bpa xpath

Error 0x80090006: Invalid Signature While Copying Files From Windows Server 2012 To Windows 7