- Home /
 
List/buttons
Hello i have some problem making list at first i have code :
 public class WebGrabber : MonoBehaviour {
     public Text proov;
     // Use this for initialization
     void Start () {
         WebClient w = new WebClient ();
         string page = w.DownloadString ("http://blog.counter-strike.net/index.php/category/updates/");
         string name = "Release (.*?)</a>";
         foreach(Match match in Regex.Matches(page,name)){
             proov.text += ("Release " + match.Groups[1].Value + "\n");
         }
     }
     void Update () {
     }
 }
 
               Do someone now how make list with match.Groups[1].Value ? and secondary how i can make so that make automatic button when code found what needed ? 
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by Tuncer · Jan 13, 2016 at 01:40 PM
 using System.Collections.Generic;
 
 List<String> matchList = new List<String>();
 foreach(Match match in Regex.Matches(page,name)){
      matchList.Add(match.Groups[1].Value);
  }
 
              I have tried that when i want put in text code is :
 proov.text += (matchList);
 
                  it give me this text:
System.Collections.Generic.List`1[System.String]
my bad i should use :
         for (int i = 0; i < matchList.Count; i++) 
         {
             proov.text += (matchList[i]);
         }
 
                  sorry for my big mistake
Your answer