Вы можете удалить цифры и ведущие подчеркивание с preg_replace
:
<?
$input = array(
'example.com/post_title/',
'example.com/post_title_2/',
'example.com/post_title_33/'
);
print_r(preg_replace('/_[0-9]+/', '', $input));
?>
Демонстрация: https://eval.in/63138
Руководство: http://us3.php.net/preg_replace