Thursday, October 25, 2018

PowerShell Split String by Whitespaces or Multiple Spaces Using Regex

I was looking into a way to split string that can take regular expression in PowerShell. Surprisingly, they have the capability:

$StringArray = $StringInput -split '\s+'

No comments:

Post a Comment