Hi, I'm new to PHP and I seem to be getting some errors with a script I'm using. Here's the error I'm getting: Warning: preg_match() [function.preg-match]: Empty regular expression in /home/content/23/10513123/html/dodosmail.php on line 41 Here's line 41 where I'm getting that error: if (preg_match("\r",$_POST['your_email_address']) || preg_match("\n",$_POST['your_email_address'])){ Any help would be greatly appreciated. Thanks!
if(preg_match("/[\r\n]/",$_POST['your_email_address'])){ PHP: But it seems you choose the wrong algorithm for yours actions
if(preg_match("/\r|\n/",$_POST['your_email_address'])){ Code (markup): your code eror because not have delimiter
Why PCRE? You may use str_replace for this situation. http://php.net/manual/en/function.str-replace.php#example-4709 PCRE created for using with variable text. i'm NOT bot, i'm learning english
you are getting this error because you are giving empty regular expression. you can use some regular expression tool to create and check for valid regular expression.