I need to wrap bold tags around any phone number within a string. I have the following regex
Call us on 0800 2458 452 now!
Call us now on 0800 2458 452
Call us now on <b>0800 2458</b> 452
$bold_text = preg_replace('/(\d[\d\s]*)(?=\s+)/', '<b>$1</b>', $text);
use word boundary instead of space
and better to add the same before
to don't match B52