I have the following code in php, which enables field "news" to get only the characters a-z and numbers 0-9 and space. How can I modify it, so except a-z, 0-9 and space to get "enter"? because when I type enter I get the error message "News field, must only contains a-z, 0-9 characters and spaces"
if( preg_match("&[^a-zA-Z0-9 ]&",$_POST['news']) ){
$errors[]='<font color="#963">News field, must only contains a-z, 0-9 characters and spaces</font>';
} preg_replace("&[^a-zA-Z0-9 ]&","",$_POST['news']);