<?php $text = '$foo$ boo hi$$ mon$k$ey $how thi$ $baz$ bar $foobar$'; var_export( preg_replace( '/\B\$\S+\$\B/', '', $text ) );
You have javascript disabled. You will not be able to edit any code.