class Check {
private static $Data;
private static $Format;
public static function Email($Email) {
self::$Data = (string) $Email;
self::$Format = "/[a-z0-9_\.\-]+@[a-z0-9_\.\-]*[a-z0-9_\.\-]+\.[a-z]{2,4}$/";
if (preg_match(self::$Data, self::$Format)):
return true;
else:
return false;
endif;
}
}
Up my code where I use, pre_match
is giving error:
Delimiter must not be alphanumeric or backslash
I researched but could not solve. What am I doing wrong?