I tried, just for curiosity, against this URL https://www.youtube.com/watch?v=_T2Dxgn-lls in a normal Firefox browser with normal .match and it wouldn't work unless removing the g flag. After removing it the regex returned the id in the array as needed. Is this the wanted behaviour?