Another way you'll probably want is to use the string replace function (forgot it's name, but it's the one that doesn't use regex), or the ereg_replace/preg_replace.
I take user input and stuff it into a database, or query the db for that data, but I know ahead of time that certain fields are numbers only and other fields are text/number only.
So by using:
$string = "13,A340Z{(NOW)34vr";
echo $string . "<br>";
$replace = array ("/,/", "/\D/i");
$string = preg_replace($replace, "", $string);
echo $string . "<br>";
$string becomes "1334034". By playing with a little regex you can do all the data validation you need.
I use it on every piece of user inputted data, along with strlen(), if for no other reason than to ensure a user can be as sloppy or dopey as possible while still allowing the program to work for them.