This is actually more of a question of string patterns, but i'll go more in depth about my question after this code:
-- YouTube specific
local Site = "https://www.youtube.com/watch?v=9bZkp7q19f0"
local Http = game:GetService'HttpService'
local SiteHtml = GetAsync(Site)
-- Get views from video
local ViewsPattern= html:match('<div class="watch%-view%-count">%d+')
-- Prints it
print(ViewsPattern:match("%d+"))
Now, this code does work, but only for videos with less than a thousand views. Other than that, it will only return the number up to the comma.
How can i make a string pattern where the script will return the views regardless of the comma? I can't say something like "%d+%p" because not all videos will be above a thousand views. Same goes for if i'm getting a video with a million views, then it has multiple commas.
Please help.

1 comment
Thank you.