Possible Duplicate:
Warning: preg_match() [function.preg-match]: Unknown modifier '/'
I am having troubles with this code wich gives me the next error:
Warning: preg_match() [function.preg-match]: Unknown modifier '{' in /usr/home/anubis-cosmetics.com/web/includes/functions/functions_email.php on line 568
Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in /usr/home/anubis-cosmetics.com/web/includes/functions/functions_email.php on line 586
Line 568:
if email domain part is an IP address, check each part for a value under 256
if (!preg_match ($valid_ip_form, $domain)) {
$digit = explode( ".", $domain );
for($i=0; $i<4; $i++) {
if ($digit[$i] > 255) {
$valid_address = false;
return $valid_address;
exit;
}
Line 586:
if (!preg_match($space_check, $email)) { // trap for spaces in
if (!preg_match ($valid_email_pattern, $email)) { // validate against valid email patterns
$valid_address = true;
} else {
$valid_address = false;
return $valid_address;
exit;
}
}
return $valid_address;
}
?>
I don't know how to do it, can someone help me with this?
EDIT/////
I've tried to change the delimiters for this: # --->
// if email domain part is an IP address, check each part for a value under 256
if (!preg_match ($valid_ip_form, $domain))#
$digit = explode( ".", $domain );
And the other one for this:
if (!preg_match($space_check, $email)) { // trap for spaces in
if (!preg_match ($valid_email_pattern, $email)) { // validate against valid email patterns
$valid_address = true;
} else {
$valid_address = false;
return $valid_address;
exit;
}
}
return $valid_address;#
And still without work... Can someone be more especific (showing me some example inline) about the problem? Thanks!