View Single Post
  #6 (permalink)  
Old Nov 16th, 2007, 06:12
c010depunkk's Avatar
c010depunkk c010depunkk is offline
SuperMember

SuperMember
Join Date: Apr 2007
Location: Willich, Germany
Age: 20
Posts: 593
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to c010depunkk
Re: Website analyser

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.
Reply With Quote