$string = "The quick brown fox jumps over the lazy dog."
$string.split()
Uses a split to break apart the string
PS C:\> $string = "The quick brown fox jumps over the lazy dog." >> $string.split() The quick brown fox jumps over the lazy dog.
$string = "The quick brown fox jumps over the lazy dog."
$string.split()
PS C:\> $string = "The quick brown fox jumps over the lazy dog." >> $string.split() The quick brown fox jumps over the lazy dog.
$string.split("`n")
PS C:\> $string = @" >> Line 1 >> Line 2 >> Line 3 >> "@ >> $string.split("`n") Line 1 Line 2 Line 3
$option = [System.StringSplitOptions]::RemoveEmptyEntries
$string.split(";",$option)
PS C:\> $string = 'A1;B2;;D4' >> $option = [System.StringSplitOptions]::RemoveEmptyEntries >> $string.split(";",$option) A1 B2 D4
$string.split(";")
PS C:\> $string = 'A1;B2;C3;D4' >> $string.split(";") A1 B2 C3 D4