I am trying to get the second line of my email stored into a variable using regular expressions. The email looks like this:
I just want the second line of it stored in a variable, but not the hyperlink. How can I use a regular expression to do this and then print it out in a message box to see if it is correct. Right now in my message box I am getting a message that says System.Linq.Enumerable+d_97`1[System.Text.RegularExpressions.Match] and I have no idea what it means.
You might not even need a regular expression if you know what your email lines are going to be.
Like in your example, if you always want to get only the second line in the email, no matter what it says, you can do yourSecondLine = yourEmailBody.Split(System.Environment.NewLine)(1)
The error message is “Option Strict on disallows implicit conversion from string to char”. Here is a text file containing the email. Just using this for testing purposes.TestEmail.txt (61 Bytes)