I am getting System.IndexOutOfRangeException everytime I try to compile my program. This is where the error is happening.
public static string findlinks2(string source)
{
char quotes = (char)34; //sets the char variable to quotes since you can't use it in a string normally
string searchstring = (quotes + "fmt_url_map" + quotes + ":" + quotes); //sets the searchstring to "fmt_url_map":
string[] fmt1 = System.Text.RegularExpressions.Regex.Split(source, searchstring); //splits html into 2 arrays
string fmt2 = fmt1[1].ToString();
The error is occuring when is trys to assign the variable fmt2 the contents of fmt[1].ToString();. The error is obviously because the array fmt[1] does not exist but I dont know why???