[정규표현식] php 문자열에서 숫자만 추출 $num = print preg_replace("/[^0-9]*/s", "", $str); 이렇게 하면 $num에는 0~9까지의 숫자형 문자만 들어가게 된다. 개발 2011.10.04