php strip non numeric code example Example: php remove non numeric $res = preg_replace("/[^0-9]/", "", "Every 6 Months" );