I am trying to use the Regex.Match method to find matching characters in a file. At the moment the regex match method uses the line of the file in memory (strLine) and checks it against the specified (m_strRegEx) and any applicable options. Although how can I output from this just the mathching characters?
Match mtch;
if (m_bIgnoreCase == true)
mtch = Regex.Match(strLine, m_strRegEx, RegexOptions.IgnoreCase);
else
mtch = Regex.Match(strLine, m_strRegEx);
I guess you need the following:
or you can search strLine for all occurrences in one go: