I need to get the paths from something like this:
var str = document.getElementById("content").innerHTML;
var res = str.match(/=http.*?.flv/gi);
'more https stuff from other url ...https://this/otherthing/thing.srt even more text...'
.* grabs as many matching characters as it can, you need to be more specific about what can and can't be in the middle.
var res = str.match(/https?:\/\/\S+\.flv/gi);
\S grabs as many non-whitespace characters as it can.
To exclude certain characters, use
var res = str.match(/https?:\/\/[^\s;]+\.flv/gi);
Alternatively, just make your
.* lazy instead of greedy with a well-placed
var res = str.match(/http.*?\.flv/gi);