Skip to content

Instantly share code, notes, and snippets.

@cagartner
Created May 20, 2013 20:02
Show Gist options
  • Save cagartner/5615049 to your computer and use it in GitHub Desktop.
Save cagartner/5615049 to your computer and use it in GitHub Desktop.
Remover pontuação e letras de números
$valor = '1,00&$@AS5689';
$numeros = preg_replace("/[^0-9]/","", $valor);
echo $numeros;
// 1005689
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment