3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/.*\'(\d*)\'.*/'; $str = '404:Not Found(CLIENT_ERROR):Product with ref \'76767\' qsdqsd'; preg_match($re, $str, $matches, PREG_OFFSET_CAPTURE, 0); // Print the entire match result echo $matches[1];

preferences:
37.21 ms | 402 KiB | 5 Q