1 2 3 4 5
<?php $your_string = '($com_mit$ + $Bug$)/$HR$*($Leader$^$IT$)'; $output= preg_replace('/(\$\w*\$)+/i', '1', $your_string); echo $output; ?>
1
(1 + 1)/1*(1^1)