3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $postcode = '64 1s40 Tiu kka'; $r = preg_replace('/[^0-9]/', '', $postcode); var_dump($r);
based on 4nJTH
Output for 4.3.0 - 7.1.0
string(5) "64140"