3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $_content = '<iframe src="//player.vimeo.com/video/36899035" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <p><a href="http://vimeo.com/36899035">Moving a Tree</a> from <a href="http://vimeo.com/user4457549">Avery Lawrence</a> on <a href="https://vimeo.com">Vimeo</a>.</p>'; preg_match('#vimeo.com[^\'"0-9]*([0-9]+)#i',$_content, $matches); var_dump($matches); echo $_content;
based on LBeLu
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(2) { [0]=> string(24) "vimeo.com/video/36899035" [1]=> string(8) "36899035" } <iframe src="//player.vimeo.com/video/36899035" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <p><a href="http://vimeo.com/36899035">Moving a Tree</a> from <a href="http://vimeo.com/user4457549">Avery Lawrence</a> on <a href="https://vimeo.com">Vimeo</a>.</p>