3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = "D-29834"; $result = preg_replace("/[^0-9]/", "", $str); echo $str;
based on 3anAO
Output for 4.3.0 - 7.2.0
D-29834