preg_match('/(\d+)/s', "article_123.html", $pockets); // Совпадение (подвыражение в скобках) окажется в $pockets[1]. echo $pockets[1]; // выводит 123