Contact: aviboots(AT)netvision.net.il
39,882 questions
51,808 answers
573 users
$str = "c++ php 17 d 900 e 8542"; $pattern = '/[^0-9\s]/'; $str = preg_replace($pattern, "", $str); echo $str; /* run: 17 900 8542 */