c# – Flexible text parsing strategies – Stack Overflow
Problem
I’m trying to find a flexible way to parse email content. Below is an example of dummy email text I’m working with. I’d also like to avoid regular expressions if at all possible. However, at this point of my problem solving process I’m beginning to think it’s inevitable. Note that this is only a small dummy subset of a full email. What I need is to parse every field (e.g. Ticket No, Cell Phone) into their respective data types. Lastly, some fields are not guaranteed to be present in the email (you’ll see in my current solution shown below why this is a problem).