I am trying to write some regex pattern code that will take out certain parts of a text by using groups. Here is the code:
private static string ParseSnippet(string ownitDirectory, string project)
Match m = Regex.Match("(" + project + "\\\\.*\\\\)", ownitDirectory, RegexOptions.IgnoreCase);
According to this page, it seems that the parameters for
Regex.Match are inverted. Have you tried this?
Regex.Match(ownitDirectory, "(" + project + "\\\\.*\\\\)", RegexOptions.IgnoreCase);