FILTER_VALIDATE vs Preg_match. Which one to use?
===

To validate input date, both form URL or from a form, which technique do you usually use?

I have been looking at <a href="http://www.w3schools.com/php/php_ref_filter.asp">PHP Filters</a> but i have rarely see them on any code.

I have usually seen the use of preg_mach, for example:

    $numbers = "/^[0-9]+$/D";

    if (preg_match($numbers, $var)){
        echo "is number";
    }

Instead of:

    if(!filter_var($var, FILTER_VALIDATE_INT))
        echo "is number";
    }

Is there any advantage using one or another?
Thanks!