A new question has arisen in relation to an earlier question of mine. I have some code that is using a regex to find email addresses. It's working great except that it returns duplicate matches. I searched this site and found a question from a long time ago that was dealing with a similar problem, and the answer had something to do with mixing the regex logic with a string[] and the Distinct() method. Unfortunately my understanding of arrays is still limited.
My code is placing all the regex matches into a MatchCollection
. Aside from that, how do I go about interacting with this MatchCollection
to only add unique matches to the regex?