Thread: Replace
View Single Post
Old 10-13-2007   #1 (permalink)
tb


 
 

Replace

Hej Powershell team.

In gui-help replace it can be defined as - a specified number of
times.
But how should i do, if i only will change the first space and not the
other space
in the following example ???

${C:\powerstart.txt} -replace ' ',';' > C:\powerstart1.txt

I need a real reference manual !!
--------------------------------------------------------------------

Replace

Definition: Returns a string in which a specified substring has been
replaced
with another substring a specified number of times.

$a = "bxnxnx"
$a = $a -replace("x","a")

Regards
Torben Brønsholm
Denmark

My System SpecsSystem Spec