All pastes #619412 Raw Edit

Mine

public php v1 · immutable
·published 2007-07-14 18:42 UTC
rendered paste body
If the following works perfectly: if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2}|[com|net|org|edu|info])$", $email))$errors[] = "A \"Valid e-Mail Address\" is required";  Then why doesnt the below work ?? if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2}|[com|net|org|edu|info|ab.ca|on.ca|org.us|co.uk])$", $email))$errors[] = "A \"Valid e-Mail Address\" is required";Then when I try to further "escape" the periods it also doesn't workif(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2}|[com|net|org|edu|info|ab\.ca|on\ca|org\.us|co\.uk])$", $email))$errors[] = "A \"Valid e-Mail Address\" is required";