Fix deprecated eregi()
Replace eregi() with preg_replace()
This commit is contained in:
parent
f3520957a9
commit
b73da4fd8a
|
|
@ -288,8 +288,8 @@
|
||||||
$normal = "^[a-z0-9_\+-]+(\.[a-z0-9_\+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2,4})$";
|
$normal = "^[a-z0-9_\+-]+(\.[a-z0-9_\+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2,4})$";
|
||||||
// define a regular expression for "strange looking" but syntactically valid addresses
|
// define a regular expression for "strange looking" but syntactically valid addresses
|
||||||
$validButRare = "^[a-z0-9,!#\$%&'\*\+/=\?\^_`\{\|}~-]+(\.[a-z0-9,!#\$%&'\*\+/=\?\^_`\{\|}~-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2,})$";
|
$validButRare = "^[a-z0-9,!#\$%&'\*\+/=\?\^_`\{\|}~-]+(\.[a-z0-9,!#\$%&'\*\+/=\?\^_`\{\|}~-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2,})$";
|
||||||
if (eregi($normal, $email)) return true;
|
if (preg_match($normal, $email)) return true;
|
||||||
else if (eregi($validButRare, $email)) return true;
|
else if (preg_match($validButRare, $email)) return true;
|
||||||
else return false;
|
else return false;
|
||||||
}
|
}
|
||||||
function writeStyles() {
|
function writeStyles() {
|
||||||
|
|
@ -304,4 +304,4 @@
|
||||||
echo "</style>";
|
echo "</style>";
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue