fork download
  1. <?php
  2. $string = 'Hello there $23! or $9!';
  3. $pattern = '/\$[0-9]+!/';
  4. $replacement = '';
  5. echo preg_replace($pattern, $replacement, $string);
  6. ?>
Success #stdin #stdout 0.02s 52432KB
stdin
Standard input is empty
stdout
Hello there  or