<?php $url = "https://www.youtube.com/watch?v=udm5jUA-2bs"; preg_match("/(\w+)(?=\.\w{2,}(\/|\?|$))/", $url, $matches); echo $matches[1];
You have javascript disabled. You will not be able to edit any code.