June 18, 200818 yr Hi, I have my regular expression checking from alphnumeric content how would I also allow punctuation to passed? if (NULL || !eregi('^[a-zA-Z]|[ ]|[0-9]{500}$',$_POST['contactName'])) { $problem = TRUE; $message .= '<p>The enquiry you entered is not valid</p>'; } else { $problem = FALSE; }
June 18, 200818 yr You could use the character class [[:punct:]] which is shorthand for the punctuation characters . , ; : -
Create an account or sign in to comment