I'm a newbie to preg_replace function. I have the following expression that I want to replace the numbers 0-9 with # in a string. It's returning the same string with no changes, where could I have gone wrong? I tried google but still cannot find the solution. Thanks.
$phonenumber = "0720123456";
$format = trim(preg_replace("/[^0-9]/", "#", $phonenumber));