3v4l.org

run code in 200+ PHP versions simultaneously
<?php $s['longDescription'] = 'replace these ***** not this* and *** this ** ****'; $blurb = preg_replace("/(?:(?<=\*)|(?=\*\*))\*/", "&#9733;", $s['longDescription']); echo $blurb;