private function extractDatetime($header) { return preg_replace('/^\\[(' . REGEX_DATETIME_PATTERN . ')\\].*/', '$1', $header); }