I have a text file which I import using Get-Content
It looks like this:
aago go sdf
bbbgo go sdf gojh
go
zzzz bbb
go
sdkfgo go sdfd
go
I want to -split it based on 'go' which is single liner "go", aka i want 3 array items only. So -split 'go' won't work.
How to specify delimiter for split where the only item in line in 'go', OR where after 'go' there is a new line?
So output I expect is this
$output[0]=
"aago go sdf
bbbgo go sdf gojh
"
$output[1]=
"zzzz bbb
"
$output[2]=
"sdkfgo go sdfd
"