I'm manipulating a test where I use multiple .replace commands to format the text.
For example
$str="hello%worldZZZniceZZZtoZZZmeet"
$str.Replace("%","`n").replace("ZZZ","`n")
Output in the console is good but I need to iterate each line.
problem is $str.count = 1 meaning powershell looks at this string still as one line even when it shows up good in the console.
any idea?
Edit:
If I output the string to file and then read the file it does read with new lines but there's a better way I'm sure instead of outputting to file and then reading it back again