I am trying to pull in data from the body of an email, then insert it into a SQL table. The piece of information in the body is an email address. When the body only contains 1 email, no issues but when there are multiple, it only pulls the top email. How do i get it to pull all email addresses to insert into my SQL table? Here is how i pull emails and also a sample of what the body looks like.
You are using Regex.Match it will store only one value. Try Regex.Matches. It will store all the matches in a collection and you can get all values using for each item loop. You have to change the data type of variable in which you are storing the result to IEnumerable<Match>