The title of your question and your post don't really help but this will maybe do what it is you want if all you want to do is return the 1
<?php
$string="x.php?0=1";
$string2=preg_match("/1/","$string");
echo $string2;//returns 1
echo $string;//returns the original x.php?0=1
?>