I'm making a stock updater in ROBLOX for my own purposes, and so I found a website that lists all the stock symbols and names. Before each stock symbol, it is followed by the string in the tomatch variable. The string I'm trying to match is repeated many times in each website, right before a stock symbol (ex: AAPL). Every time I run it, it returns 0 stocks found. I made sure that the page type was a string, so I don't get why it's not finding that string repeated multiple times. Can you help me?
local http = game.HttpService;
matches = {};
tomatch = '<TD VALIGN=TOP ALIGN=LEFT WIDTH=124><P ALIGN=LEFT><FONT COLOR="#000000" SIZE="-1" FACE="MS Sans Serif">'
url = "http://www.allstocks.com/NASDAQ/nasdaq_stock_symbols_a.html";
page = http:GetAsync(url, true);
for val in string.gmatch(page, tomatch) do
table.insert(matches, val);
end;
print(type (page))
print()
print("Number of different stocks found: " .. #matches)
