Warning: preg_match(): No ending delimiter '^' found in .../functions/validations.php on line 29
The code:
if (preg_match($mail_pat, $email, $components)) {
What and where do I make the edit?
Warning: preg_match(): No ending delimiter '^' found in .../functions/validations.php on line 29
The code:
if (preg_match($mail_pat, $email, $components)) {
What and where do I make the edit?
A Perl-based regex should be inside the delimiters... "/your regex here/"
... the deprecated POSIX regex were the one which did not require any delimiter... For example, ereg(").
You must add delimiters to your regex:
if (preg_match('/' . $mail_pat . '/', $email, $components)) {
$mail_pat starts with a ^
, but it ends with another character, which causes the error since there aren't any matching delimiters.