I have input file like this:
input.txt
[email protected] [email protected] "Information" "Hi there"
[email protected] [email protected] "Follow up" "Interview"
I have used this method:
string[] words = item.Split(' ');
However, it splits every words with space. I also have spaces in quotes strings but I won't split those spaces.
Basically I want to parse this input from file to this output:
From = [email protected]
To = [email protected]
Subject = Information
Body = Hi there
How do I split these strings in C#?