- Code: Select all
public Match find(string reg)
{
Regex r = new Regex(reg);
Match m = r.Match(output);
return Regex.Replace(m.ToString(),@"<(.|\n)*?>",string.Empty);;
}
public MatchCollection find2(string reg)
{
Regex r = new Regex(reg);
MatchCollection m = r.Matches(output);
// do the same as above in a loop
}
That should work.... I'm not sure what a MatchCollection is - Array or whatever - just make some kind of loop and do that same as in the first function, and write the results into an ArrayList or a List and then return that.