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

0x300000d errors in Microsoft Remote Desktop client