I am trying to match digit and .
and replacing it with ""
no char.
$buffer= "test. 8090";
if PREG_REPLACE('/[0-9]+[.]/', '', $buffer)
{
echo $buffer;
}
What's wrong here? gives syntex error
I am trying to match digit and .
and replacing it with ""
no char.
$buffer= "test. 8090";
if PREG_REPLACE('/[0-9]+[.]/', '', $buffer)
{
echo $buffer;
}
What's wrong here? gives syntex error
Put both digit and dot inside the character class []
$new_str = PREG_REPLACE('/[0-9.]+/', '', $buffer);
^ here goes the dot