Hyvor Developer
Home
Download
Copy
Code
<?php $str = 'H*H*H*H*'; $regex = '/\*/'; echo preg_replace($regex, '$', $str); // returns H$H$H$H$
Result