I'm a php beginner, I want to use preg_match() to instead of eregi() in the following code, but I don't know how to do that.
if (!eregi(“^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$”, trim($_POST['email']))) {
I simply replace eregi to preg_match, but I got php error "PHP Warning: preg_match(): No ending delimiter ‘^’ found"
How can I fix it?
Thanks so much!