3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'test //ita https://example.com lics// test // another // one'; $regex = '~(https?://)(*SKIP)(*F)|//\s*((?:(?1)|.)*?)\s*//~'; preg_match_all($regex, $text, $matches); print_r($matches[2]);

preferences:
30.85 ms | 405 KiB | 5 Q