3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = 'ae8973fc22962b40a654e26e733d9fd9567741a9 refs/tags/1.0.1 ae8973fc22962b40a654e26e733d9fd9567741ase refs/tags/1.0.20 ae8973fc22962b40a654e26e733d9fd9567741asd refs/tags/1.0.3 ae8973fc22962b40a654e26e733d9fd9567741asd refs/tags/1.0.2-stag a2dc1ef92e9cb6ba026569a57e1db125350e3a32 refs/tags/1.0.1^{}'; preg_match_all("/tags\/([0-9]+\.[0-9]+\.[0-9]+)$/ims", $string, $matches); var_dump($matches);
Output for 4.3.0 - 5.6.30, hhvm-3.10.1 - 3.22.0, 7.0.0 - 7.3.0rc3
array(2) { [0]=> array(3) { [0]=> string(10) "tags/1.0.1" [1]=> string(11) "tags/1.0.20" [2]=> string(10) "tags/1.0.3" } [1]=> array(3) { [0]=> string(5) "1.0.1" [1]=> string(6) "1.0.20" [2]=> string(5) "1.0.3" } }