SyntaxFix
Write A Post
Hire A Developer
Questions
$text='<span style="font-weight: bold;">Foo</span>'; $text=preg_replace( '/<span style="font-weight: bold;">(.*?)<\/span>/', '<strong>$1</strong>',$text);
Note: only work for your example.