How could I manupilate string by Powershell


how manupilate string powershell in excel   left(), right() , mid(), find() ?

in powershell can string manipulation using of methods of [string] object, or using of powershell operators operate on string  -match, -replace, -split, -join, +, *, (there may more).

  can manipulate them as character arrays, using array slicing.  $string[0] first character of string.  $string[-1] last character.  $string[0..2] , $string[-3..-1] first 3 , last 3 characters, respectively.


[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "





Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

2008 Windows Deployment Server Properties Error

Can no longer user MS Update - Files required to use Microsoft Update are no longer registered

How do a find data in one file, search for it in another file and if not found, write a custom message to another file