I am stuck in a very simple PHP problem.
I am having a string as $a = "123 text";
or it can also be $a="lorem ipsum 1234 dummy text";
I want that the output shall be $a="text";
or $a="lorem ipsum dummy text";
In short I want to exclude the number that can either be 123 or 12345 or anything else.
I have tried $except_txt = "text 123456 dummy";
$pattern = "/12/";
$replacement = "";
$path = preg_replace($pattern, $replacement, $except_txt);
but I get output as $except_txt = "text 3456 dummy";