I had that test that worked fine :
if (ereg("([0-9]{2})[-./]([0-9]{2})[-./]([0-9]{4})[ ]([0-9]{2}):([0-9]{2}):([0-9]{2})", $dateToTest, $tab) == false)
and as ereg is deprecated, I have replaced that test with this one :
if (preg_match("/([0-9]{2})[-./]([0-9]{2})[-./]([0-9]{4})[ ]([0-9]{2}):([0-9]{2}):([0-9]{2})/", $dateToTest, $tab) == false)
But I get the following error :
Warning: preg_match() [function.preg-match]: Unknown modifier '.' in ..................
What is the problem and how may I solve it ?