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

Domain migration ERR3:7075 Failed to change domain affiliation, hr=8007054a This operation is only allowed for the Primary Domain Controller of the domain

2008 Windows Deployment Server Properties Error

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