My files had both /n and /r on each line and chop is kinda scary.
I am reading line by line, because my file contains multiple ipconfig outputs. I was keeping state for each machine and cycling through.
I tried the code you suggest, but when I modify to read from STDIN, the regex doesn't see the DNS Servers line. I am not great with regex and having trouble figuring out what is wrong.