- var_dump: documentation ( source)
- preg_match: documentation ( source)
<?php
$re = '/.*\'(\d*)\'.*/';
$str = '404:Not Found(CLIENT_ERROR):Product with ref \'76767\' qsdqsd';
preg_match($re, $str, $matches);
// Print the entire match result
var_dump($matches[1]);