User login

code snippets

Strip non-numeric characters from a string with PHP Perl-style regular expression

<?php
$numbers_only_string = preg_replace('/\D/', '', $string);
?>

Yeah, that there's a regexp character for "not a digit". Craziness.

Syndicate content