PHP - How to remove symbols which are not digits from a string?
In order to do this you may use the following regular expression: <?php .... $strOutput = ereg_replace("[^[:digit:]]", "", $strInput); ... ?> In this case for example if Input is 43~34^67, the output will be: 433467