You can test for all the three patterns at once with this
if (preg_match('/^([0-9]{2}\.\*|[0-9]{2}\.[0-9]{4}\.\*|[0-9]{2}\.[0-9]{4}\.[0-9]{2})$/', $article)) {
// match
}
else {
// no match
}
The '.' (dot) and the "*" are special characters in regular expressions, so if you want to match those characters you have to escape them (put a "\" - backslash - before each special character you want to escape)