This question already has an answer here:
- How can I convert ereg expressions to preg in PHP? 4 answers
- Alternative Function for EREGI in PHP 1 answer
So, i was using eregi in my mail script, but as of lately, i get the error that the function is deprecated.
So, what is the easiest way to replace the following bit of code:
if (!eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$", trim($_POST['email'])))?
Any help is appreciated :)