PowerTip: Use PowerShell Split Operator to Break Strings

Doctor Scripto

Summary: Learn how to use the Windows PowerShell Split operator to break up strings.

Hey, Scripting Guy! Question How can I use Windows PowerShell to break a string at a specific character?

Hey, Scripting Guy! Answer Use the Split operator and specify the character to split on, for example:

PS C:\> "this,is,a,string" -split ","

0 comments

Discussion is closed.

Feedback usabilla icon