Creating new PHP pages (pagination)
In this case you just want your input to be an integer (or a long).
So using the regex is one idea.

But you should also consider malicious users. What if you try


  example.com/article.php?id=1000000000000000000000000000


Which is too big for int/bigint. When the exception is not caught well and your error pages expose information. Worst case this may expose information about the underlying directory structure. Which can be used by hackers while doing other attacks. And even when this is not the case, passing through exceptions are not a best practice.

I would rather use a built-in php method for that like intval. 

As an addition to this, you can also use prepared statements which is another very good way to protect against sql injections.

$idv = intval($_GET['id']);      
if($idv &gt; 0)
{
    $stmt = $mysqli-&gt;prepare("SELECT name, description, date, id, date_created FROM articles WHERE id = ? LIMIT 1");
    $stmt-&gt;bind_param("i", $idv);
    $stmt-&gt;execute();
    $stmt-&gt;bind_result($result);
    $stmt-&gt;fetch();
    $stmt-&gt;close();
}


ref: 


http://php.net/manual/en/function.intval.php
http://www.w3schools.com/php/php_mysql_prepared_statements.asp
https://phpbestpractices.org/