<?php $str = "Foo *Bar* Baz"; var_dump(preg_replace_callback('{\*([\\\*]*[^\*]+)\*?}', function($matches) { return "<b>{$matches[1]}</b>"; }, $str));
You have javascript disabled. You will not be able to edit any code.