<?php $value = '2010sdfs'; $pattern = '(\d{4}(-\d{2})?(-\d{2})?( \d{2})?(:\d{2})?(:\d{2})?)'; var_dump(preg_match($pattern, $value));
You have javascript disabled. You will not be able to edit any code.