I want to bold everything in a string that comes before a : and do it the following way (PHP):
$string = preg_replace('/(.*):/', '<span class="bold">\\1:</span>', $string);
Now I need an exception: I do NOT want to bold the text if there is a ( before the :. Is this possible?
(So basically Size: 123 should get bolded, but We increase this (Max: 30) should NOT get bolded)
<img alt="Foo:bar" />Now what? // Even better:<a href="http://example.com"><img src="http://example.com/image.png"/></a>:)