The -split operator splits a string into an array based on a regular expression.
The following example splits the string into an array containing a, b, c, and d by matching each of the numbers:
PS> 'a1b2c3d4' -split '[0-9]'
a
b
c
d
The -split operator splits a string into an array based on a regular expression.
The following example splits the string into an array containing a, b, c, and d by matching each of the numbers:
PS> 'a1b2c3d4' -split '[0-9]'
a
b
c
d