I have a string that I want to split into two parts. The first part is before the comma ( , ), and the second part is everything after the comma (including commas).
I already managed to get the first part before the comma in the $Header variable, but I donβt know how to get the fragments after the first comma in one big line, so it contains
$Content = "Text 1,Text 2,Text 3,Text 4,"
There may be more text visible here, for example, text 5, text 6, ..
$String = "Header text,Text 1,Text 2,Text 3,Text 4," $Header = $String.Split(',')[0] //<-- $Header = "Header text"
string split powershell
DarkLite1
source share