<?php
$oldstring="12. What is Your Name";
$newstring=preg_replace('/[\d]+[\.]+[\s?]/', '',$oldstring);
echo $newstring;
?>
Result : What is Your Name
Here removes serial number from a string. eg : 12. Pattern match search for [\d]+[\.] . This means any digit followed by a dot(.)